summaryrefslogtreecommitdiff
path: root/drivers/net/can
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2019-08-27 22:11:17 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2019-09-03 11:28:13 +0300
commitf59d7824bfd1cd46a0968b112a2b6ae3f1e1dd8b (patch)
treea3bda71b811e3cee9ffe5b7d029d13e4f8a5aba1 /drivers/net/can
parentd726c01aa7448076be8b5162c2a754e2cf68d476 (diff)
downloadlinux-f59d7824bfd1cd46a0968b112a2b6ae3f1e1dd8b.tar.xz
can: dev: can_restart(): convert NULL pointer check
This patch converts the NULL pointer check in can_restart() form "skb == NULL" to "!skb". Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index c80d32c04833..0d18a719ded9 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -552,7 +552,7 @@ static void can_restart(struct net_device *dev)
/* send restart message upstream */
skb = alloc_can_err_skb(dev, &cf);
- if (skb == NULL) {
+ if (!skb) {
err = -ENOMEM;
goto restart;
}