diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-08-27 21:11:17 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2019-09-03 10:28:13 +0200 |
commit | f59d7824bfd1cd46a0968b112a2b6ae3f1e1dd8b (patch) | |
tree | a3bda71b811e3cee9ffe5b7d029d13e4f8a5aba1 /drivers/net/can | |
parent | d726c01aa7448076be8b5162c2a754e2cf68d476 (diff) | |
download | talos-op-linux-f59d7824bfd1cd46a0968b112a2b6ae3f1e1dd8b.tar.gz talos-op-linux-f59d7824bfd1cd46a0968b112a2b6ae3f1e1dd8b.zip |
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.c | 2 |
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; } |