From: Jinpeng Cui <[email protected]>
Return value from mlxsw_core_bus_device_register() directly
instead of taking this in another redundant variable.
Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Jinpeng Cui <[email protected]>
---
drivers/net/ethernet/mellanox/mlxsw/core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c
index afbe046b35a0..be9901ddf987 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.c
@@ -1496,15 +1496,14 @@ 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,
+
+ return mlxsw_core_bus_device_register(mlxsw_core->bus_info,
mlxsw_core->bus,
mlxsw_core->bus_priv, true,
devlink, extack);
- return err;
}
static int mlxsw_devlink_flash_update(struct devlink *devlink,
--
2.25.1
[email protected] writes:
> From: Jinpeng Cui <[email protected]>
>
> Return value from mlxsw_core_bus_device_register() directly
> instead of taking this in another redundant variable.
>
> Reported-by: Zeal Robot <[email protected]>
> Signed-off-by: Jinpeng Cui <[email protected]>
Reviewed-by: Petr Machata <[email protected]>
Thanks!
On Mon, Aug 29, 2022 at 5:56 PM wrote:
> From: Jinpeng Cui <[email protected]>
>
> Return value from mlxsw_core_bus_device_register() directly
> instead of taking this in another redundant variable.
>
> Reported-by: Zeal Robot <[email protected]>
> Signed-off-by: Jinpeng Cui <[email protected]>
Reviewed-by: Ammar Faizi <[email protected]>
On Mon, 29 Aug 2022 10:54:55 +0000 [email protected] wrote:
> + return mlxsw_core_bus_device_register(mlxsw_core->bus_info,
> mlxsw_core->bus,
> mlxsw_core->bus_priv, true,
> devlink, extack);
Please realign continuation lines so that their starts match the
opening bracket. Please keep the review tags you received.