From: Xu Panda <[email protected]>
Return the value mlxsw_core_bus_device_register() directly instead of
storing it in another redundant variable.
Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Xu Panda <[email protected]>
---
drivers/net/ethernet/mellanox/mlxsw/core.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c
index e2a985ec2c76..8daedf6c4496 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.c
@@ -1513,15 +1513,13 @@ mlxsw_devlink_core_bus_device_reload_up(struct devlink *devlink, enum devlink_re
struct netlink_ext_ack *extack)
{
struct mlxsw_core *mlxsw_core = devlink_priv(devlink);
- int err;
*actions_performed = BIT(DEVLINK_RELOAD_ACTION_DRIVER_REINIT) |
BIT(DEVLINK_RELOAD_ACTION_FW_ACTIVATE);
- err = mlxsw_core_bus_device_register(mlxsw_core->bus_info,
- mlxsw_core->bus,
- mlxsw_core->bus_priv, true,
- devlink, extack);
- return err;
+ return mlxsw_core_bus_device_register(mlxsw_core->bus_info,
+ mlxsw_core->bus,
+ mlxsw_core->bus_priv, true,
+ devlink, extack);
}
static int mlxsw_devlink_flash_update(struct devlink *devlink,
--
2.15.2
On Mon, Sep 12, 2022 at 07:29:34AM +0000, [email protected] wrote:
> From: Xu Panda <[email protected]>
>
> Return the value mlxsw_core_bus_device_register() directly instead of
> storing it in another redundant variable.
>
> Reported-by: Zeal Robot <[email protected]>
> Signed-off-by: Xu Panda <[email protected]>
For net-next:
Reviewed-by: Ido Schimmel <[email protected]>
Please use "PATCH net-next" prefix for such patches:
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#how-do-i-indicate-which-tree-net-vs-net-next-my-patch-should-be-in
On Mon, 12 Sep 2022 07:29:34 +0000 [email protected] wrote:
> From: Xu Panda <[email protected]>
>
> Return the value mlxsw_core_bus_device_register() directly instead of
> storing it in another redundant variable.
This patch does not apply cleanly to net-next, please rebase.