diff options
author | Su Hui <suhui@nfschina.com> | 2023-10-19 16:33:52 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-10-20 17:39:32 -0700 |
commit | a1e4c334cbc9a80578c3784f8a3e7076bb19578d (patch) | |
tree | 09e13faacbe6cddad4402330b7d9d4aff51e84d4 /drivers/net/ethernet/amd | |
parent | 86a0348de98576c8e3826d911db815a7105eaf41 (diff) | |
download | lwn-a1e4c334cbc9a80578c3784f8a3e7076bb19578d.tar.gz lwn-a1e4c334cbc9a80578c3784f8a3e7076bb19578d.zip |
pds_core: add an error code check in pdsc_dl_info_get
check the value of 'ret' after call 'devlink_info_version_stored_put'.
Signed-off-by: Su Hui <suhui@nfschina.com>
Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
Link: https://lore.kernel.org/r/20231019083351.1526484-1-suhui@nfschina.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/amd')
-rw-r--r-- | drivers/net/ethernet/amd/pds_core/devlink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amd/pds_core/devlink.c b/drivers/net/ethernet/amd/pds_core/devlink.c index 8b2b9e0d59f3..57f88c8b37de 100644 --- a/drivers/net/ethernet/amd/pds_core/devlink.c +++ b/drivers/net/ethernet/amd/pds_core/devlink.c @@ -124,6 +124,8 @@ int pdsc_dl_info_get(struct devlink *dl, struct devlink_info_req *req, snprintf(buf, sizeof(buf), "fw.slot_%d", i); err = devlink_info_version_stored_put(req, buf, fw_list.fw_names[i].fw_version); + if (err) + return err; } err = devlink_info_version_running_put(req, |