mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
net: hdlc_ppp: move out assignment in if condition
Should not use assignment in if condition. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cb36c4112c
commit
4ec479527b
1 changed files with 2 additions and 1 deletions
|
@ -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 */
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue