mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 19:34:35 +00:00
efi_loader: check return value of part_get_info()
part_get_info() may return an error code. Check it. Update function description of dp_part_node(). Addresses-Coverity-ID: 184067 ("Unchecked return value") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
5a2d5cbd31
commit
1becdfcdc1
1 changed files with 6 additions and 1 deletions
|
@ -843,12 +843,17 @@ static unsigned dp_part_size(struct blk_desc *desc, int part)
|
||||||
* @buf buffer to which the device path is written
|
* @buf buffer to which the device path is written
|
||||||
* @desc block device descriptor
|
* @desc block device descriptor
|
||||||
* @part partition number, 0 identifies a block device
|
* @part partition number, 0 identifies a block device
|
||||||
|
*
|
||||||
|
* Return: pointer to position after the node
|
||||||
*/
|
*/
|
||||||
static void *dp_part_node(void *buf, struct blk_desc *desc, int part)
|
static void *dp_part_node(void *buf, struct blk_desc *desc, int part)
|
||||||
{
|
{
|
||||||
struct disk_partition info;
|
struct disk_partition info;
|
||||||
|
int ret;
|
||||||
|
|
||||||
part_get_info(desc, part, &info);
|
ret = part_get_info(desc, part, &info);
|
||||||
|
if (ret < 0)
|
||||||
|
return buf;
|
||||||
|
|
||||||
if (desc->part_type == PART_TYPE_ISO) {
|
if (desc->part_type == PART_TYPE_ISO) {
|
||||||
struct efi_device_path_cdrom_path *cddp = buf;
|
struct efi_device_path_cdrom_path *cddp = buf;
|
||||||
|
|
Loading…
Add table
Reference in a new issue