Commit da0729e8 authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller

ionic: simplify returns in devlink info

There is no need for a goto in this bit of code.
Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent df428e40
...@@ -19,31 +19,30 @@ static int ionic_dl_info_get(struct devlink *dl, struct devlink_info_req *req, ...@@ -19,31 +19,30 @@ static int ionic_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
err = devlink_info_driver_name_put(req, IONIC_DRV_NAME); err = devlink_info_driver_name_put(req, IONIC_DRV_NAME);
if (err) if (err)
goto info_out; return err;
err = devlink_info_version_running_put(req, err = devlink_info_version_running_put(req,
DEVLINK_INFO_VERSION_GENERIC_FW, DEVLINK_INFO_VERSION_GENERIC_FW,
idev->dev_info.fw_version); idev->dev_info.fw_version);
if (err) if (err)
goto info_out; return err;
snprintf(buf, sizeof(buf), "0x%x", idev->dev_info.asic_type); snprintf(buf, sizeof(buf), "0x%x", idev->dev_info.asic_type);
err = devlink_info_version_fixed_put(req, err = devlink_info_version_fixed_put(req,
DEVLINK_INFO_VERSION_GENERIC_ASIC_ID, DEVLINK_INFO_VERSION_GENERIC_ASIC_ID,
buf); buf);
if (err) if (err)
goto info_out; return err;
snprintf(buf, sizeof(buf), "0x%x", idev->dev_info.asic_rev); snprintf(buf, sizeof(buf), "0x%x", idev->dev_info.asic_rev);
err = devlink_info_version_fixed_put(req, err = devlink_info_version_fixed_put(req,
DEVLINK_INFO_VERSION_GENERIC_ASIC_REV, DEVLINK_INFO_VERSION_GENERIC_ASIC_REV,
buf); buf);
if (err) if (err)
goto info_out; return err;
err = devlink_info_serial_number_put(req, idev->dev_info.serial_num); err = devlink_info_serial_number_put(req, idev->dev_info.serial_num);
info_out:
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment