diff mbox series

pds_core: add an error code check in pdsc_dl_info_get

Message ID 20231019083351.1526484-1-suhui@nfschina.com (mailing list archive)
State Accepted
Commit a1e4c334cbc9a80578c3784f8a3e7076bb19578d
Delegated to: Netdev Maintainers
Headers show
Series pds_core: add an error code check in pdsc_dl_info_get | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 1388 this patch: 1388
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1388 this patch: 1388
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Su Hui Oct. 19, 2023, 8:33 a.m. UTC
check the value of 'ret' after call 'devlink_info_version_stored_put'.

Signed-off-by: Su Hui <suhui@nfschina.com>
---
 drivers/net/ethernet/amd/pds_core/devlink.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Shannon Nelson Oct. 19, 2023, 3:52 p.m. UTC | #1
On 10/19/2023 1:33 AM, Su Hui wrote:
> 
> check the value of 'ret' after call 'devlink_info_version_stored_put'.
> 
> Signed-off-by: Su Hui <suhui@nfschina.com>

Thanks.

Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>

> ---
>   drivers/net/ethernet/amd/pds_core/devlink.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/amd/pds_core/devlink.c b/drivers/net/ethernet/amd/pds_core/devlink.c
> index d9607033bbf2..09041f7fccaf 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,
> --
> 2.30.2
>
patchwork-bot+netdevbpf@kernel.org Oct. 21, 2023, 12:50 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 19 Oct 2023 16:33:52 +0800 you wrote:
> check the value of 'ret' after call 'devlink_info_version_stored_put'.
> 
> Signed-off-by: Su Hui <suhui@nfschina.com>
> ---
>  drivers/net/ethernet/amd/pds_core/devlink.c | 2 ++
>  1 file changed, 2 insertions(+)

Here is the summary with links:
  - pds_core: add an error code check in pdsc_dl_info_get
    https://git.kernel.org/netdev/net-next/c/a1e4c334cbc9

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/amd/pds_core/devlink.c b/drivers/net/ethernet/amd/pds_core/devlink.c
index d9607033bbf2..09041f7fccaf 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,