Skip to content

Commit

Permalink
can: softing: remove redundant NULL check
Browse files Browse the repository at this point in the history
In this case dev cannot be NULL, so remove redundant check.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 03fd3cf ("can: add driver for Softing card")
Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
Link: https://lore.kernel.org/all/20240211150535.3529-1-d.dulov@aladdin.ru
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Daniil Dulov authored and Marc Kleine-Budde committed Feb 12, 2024
1 parent 85216f5 commit 383de56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/can/softing/softing_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ int softing_startstop(struct net_device *dev, int up)
return ret;

bus_bitmask_start = 0;
if (dev && up)
if (up)
/* prepare to start this bus as well */
bus_bitmask_start |= (1 << priv->index);
/* bring netdevs down */
Expand Down

0 comments on commit 383de56

Please sign in to comment.