mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
amt: remove unnecessary skb pointer check
The skb pointer will be checked in kfree_skb(), so remove the outside check. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Taehee Yoo <ap420073@gmail.com> Link: https://lore.kernel.org/r/20220818093114.2449179-1-yangyingliang@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
b690842d12
commit
6745bc9b03
1 changed files with 2 additions and 4 deletions
|
@ -2894,8 +2894,7 @@ static void amt_event_work(struct work_struct *work)
|
|||
amt_event_send_request(amt);
|
||||
break;
|
||||
default:
|
||||
if (skb)
|
||||
kfree_skb(skb);
|
||||
kfree_skb(skb);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3033,8 +3032,7 @@ static int amt_dev_stop(struct net_device *dev)
|
|||
cancel_work_sync(&amt->event_wq);
|
||||
for (i = 0; i < AMT_MAX_EVENTS; i++) {
|
||||
skb = amt->events[i].skb;
|
||||
if (skb)
|
||||
kfree_skb(skb);
|
||||
kfree_skb(skb);
|
||||
amt->events[i].event = AMT_EVENT_NONE;
|
||||
amt->events[i].skb = NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue