提交 fe5a5091 编写于 作者: S Sean Anderson 提交者: Tom Rini

part: Fix bogus return from part_get_info_by_dev_and_name

blk_get_device_by_str returns the device number on success. So we must
check if the return was negative to determine an error.
Signed-off-by: NSean Anderson <sean.anderson@seco.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 7194527b
......@@ -725,7 +725,7 @@ static int part_get_info_by_dev_and_name(const char *dev_iface,
}
ret = blk_get_device_by_str(dev_iface, dev_str, dev_desc);
if (ret)
if (ret < 0)
goto cleanup;
ret = part_get_info_by_name(*dev_desc, part_str, part_info);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册