Skip to content

Commit 3625a04

Browse files
Su Huiopsiff
authored andcommitted
pds_core: add an error code check in pdsc_dl_info_get
[ Upstream commit a1e4c33 ] 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> Stable-dep-of: 3d4432d ("pds_core: ensure null-termination for firmware version strings") Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit d3f3d6fa0cad8193f049e5b65d9e9cb2cbdb1b4c) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent f22c0bb commit 3625a04

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/net/ethernet/amd/pds_core/devlink.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ int pdsc_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
126126
snprintf(buf, sizeof(buf), "fw.slot_%d", i);
127127
err = devlink_info_version_stored_put(req, buf,
128128
fw_list.fw_names[i].fw_version);
129+
if (err)
130+
return err;
129131
}
130132

131133
err = devlink_info_version_running_put(req,

0 commit comments

Comments
 (0)