提交 7cb31e39 编写于 作者: A Anders Dellien 提交者: Tom Rini

cmd: part: Correct error handling

As 'part_get_info_by_name' now returns more status codes than just
-1 to indicate failure, we need to update the return value check.
Signed-off-by: NAnders Dellien <anders.dellien@arm.com>
Reviewed-by: NSean Anderson <sean.anderson@seco.com>
上级 2132fce7
......@@ -140,7 +140,7 @@ static int do_part_info(int argc, char *const argv[], enum cmd_part_info param)
return 1;
} else {
part = part_get_info_by_name(desc, argv[2], &info);
if (part == -1)
if (part < 0)
return 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册