dm: blk: Fix get_desc to return block device descriptor
authorMichal Simek <michal.simek@xilinx.com>
Wed, 16 Nov 2016 16:37:42 +0000 (17:37 +0100)
committerSimon Glass <sjg@chromium.org>
Sat, 3 Dec 2016 03:53:19 +0000 (20:53 -0700)
commit4408f6f445acc242efc8dcf3c346ca3f3a9bc9f0
treec08a7ec091d05bda81631b2c5cdb8f16d419aa13
parent2f11cd9121658b65a1d0789b37f290b207993a34
dm: blk: Fix get_desc to return block device descriptor

Current get_desc() implementation is not able to succesfully
finish and return pointer to block device descriptor.

Also function always return non zero value even device is found.

The patch fills block device descriptor and return 0 if device is found.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/block/blk-uclass.c