Commit afa64629 authored by Ziyang Xuan's avatar Ziyang Xuan Committed by Tony Nguyen

ice: Remove unnecessary NULL check before dev_put

Since commit b37a4668 ("netdevice: add the case if dev is NULL"),
dev_put(NULL) is safe, check NULL before dev_put() is not needed.
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent 0ca85829
......@@ -447,11 +447,9 @@ void ice_deinit_lag(struct ice_pf *pf)
if (lag->pf)
ice_unregister_lag_handler(lag);
if (lag->upper_netdev)
dev_put(lag->upper_netdev);
dev_put(lag->upper_netdev);
if (lag->peer_netdev)
dev_put(lag->peer_netdev);
dev_put(lag->peer_netdev);
kfree(lag);
......
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