Message ID | 20210426065452.3411360-2-mkl@pengutronix.de |
---|---|
State | New |
Headers | show |
Series | [net-next,1/4] can: etas_es58x: Fix missing null check on netdev pointer | expand |
diff --git a/drivers/net/can/usb/etas_es58x/es58x_core.h b/drivers/net/can/usb/etas_es58x/es58x_core.h index 5f4e7dc5be35..fcf219e727bf 100644 --- a/drivers/net/can/usb/etas_es58x/es58x_core.h +++ b/drivers/net/can/usb/etas_es58x/es58x_core.h @@ -625,7 +625,7 @@ static inline int es58x_get_netdev(struct es58x_device *es58x_dev, return -ECHRNG; *netdev = es58x_dev->netdev[channel_idx]; - if (!netdev || !netif_device_present(*netdev)) + if (!*netdev || !netif_device_present(*netdev)) return -ENODEV; return 0;