From f59d7824bfd1cd46a0968b112a2b6ae3f1e1dd8b Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Tue, 27 Aug 2019 21:11:17 +0200 Subject: [PATCH] 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 --- drivers/net/can/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.30.2