Message ID | 1623938599-25981-5-git-send-email-huangguangbin2@huawei.com |
---|---|
State | New |
Headers | show |
Series | net: hdlc_ppp: clean up some code style issues | expand |
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index 861491206f12..fb5102c1afc6 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c @@ -375,7 +375,8 @@ static void ppp_cp_parse_cr(struct net_device *dev, u16 pid, u8 id, u8 *out; unsigned int len = req_len, nak_len = 0, rej_len = 0; - if (!(out = kmalloc(len, GFP_ATOMIC))) { + out = kmalloc(len, GFP_ATOMIC); + if (!out) { dev->stats.rx_dropped++; return; /* out of memory, ignore CR packet */ }