From: Marc Kleine-Budde Date: Tue, 27 Aug 2019 19:11:17 +0000 (+0200) Subject: can: dev: can_restart(): convert NULL pointer check X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f59d7824bfd1cd46a0968b112a2b6ae3f1e1dd8b;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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; }