Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: mlxsw: linecards: fix missing error check in mlxsw_linecard_devlink_info_get()

The call to devlink_info_version_fixed_put() in
mlxsw_linecard_devlink_info_get() did not check for errors,
although it is checked everywhere in the code.

Add missed 'err' check to the mlxsw_linecard_devlink_info_get()

Fixes: 3fc0c51905fb ("mlxsw: core_linecards: Expose device PSID over device info")
Signed-off-by: Pavel Zhigulin <Pavel.Zhigulin@kaspersky.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20251113161922.813828-1-Pavel.Zhigulin@kaspersky.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Pavel Zhigulin and committed by
Jakub Kicinski
b0c959fe e6751b0b

+2
+2
drivers/net/ethernet/mellanox/mlxsw/core_linecards.c
··· 601 601 err = devlink_info_version_fixed_put(req, 602 602 DEVLINK_INFO_VERSION_GENERIC_FW_PSID, 603 603 info->psid); 604 + if (err) 605 + goto unlock; 604 606 605 607 sprintf(buf, "%u.%u.%u", info->fw_major, info->fw_minor, 606 608 info->fw_sub_minor);