Commit 4ec47952 authored by Peng Li's avatar Peng Li Committed by David S. Miller

net: hdlc_ppp: move out assignment in if condition

Should not use assignment in if condition.
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cb36c411
......@@ -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 */
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment