OSDN Git Service

can: etas_es58x: Fix missing null check on netdev pointer
authorColin Ian King <colin.king@canonical.com>
Thu, 15 Apr 2021 08:47:23 +0000 (09:47 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 24 Apr 2021 12:36:50 +0000 (14:36 +0200)
commit2ce4fd5a0039b805a6716779e8669dd69a20ad60
tree5063d83b17f9329b0aa4614695f8378163ee8198
parentb2f0ca00e6b34bd57c9298a869ea133699e8ec39
can: etas_es58x: Fix missing null check on netdev pointer

There is an assignment to *netdev that is that can potentially be null
but the null check is checking netdev and not *netdev as intended. Fix
this by adding in the missing * operator.

Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")
Link: https://lore.kernel.org/r/20210415084723.1807935-1-colin.king@canonical.com
Addresses-Coverity: ("Dereference before null check")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/etas_es58x/es58x_core.h