提交 afa64629 编写于 作者: Z Ziyang Xuan 提交者: 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: NZiyang Xuan <william.xuanziyang@huawei.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
上级 0ca85829
...@@ -447,11 +447,9 @@ void ice_deinit_lag(struct ice_pf *pf) ...@@ -447,11 +447,9 @@ void ice_deinit_lag(struct ice_pf *pf)
if (lag->pf) if (lag->pf)
ice_unregister_lag_handler(lag); 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); kfree(lag);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册