can: dev: can_restart(): convert NULL pointer check
authorMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 27 Aug 2019 19:11:17 +0000 (21:11 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 3 Sep 2019 08:28:13 +0000 (10:28 +0200)
This patch converts the NULL pointer check in can_restart() form "skb ==
NULL" to "!skb".

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev.c

index c80d32c048334ddad97baebd19a485c13bf4ddfa..0d18a719ded981424e6f4095a101ef7e0f9ff6ac 100644 (file)
@@ -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;
        }