Message ID | 1611748244-20592-1-git-send-email-wangyunjian@huawei.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] ice: remove redundant null check on pf | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 3 maintainers not CCed: jesse.brandeburg@intel.com anthony.l.nguyen@intel.com david.m.ertman@intel.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 11 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
On Wed, 2021-01-27 at 19:50 +0800, wangyunjian wrote: > From: Yunjian Wang <wangyunjian@huawei.com> > > Before calling ice_set_dflt_mib(), the 'pf' has been dereferenced. > So the additional check is unnecessary, just remove it. > > Addresses-Coverity: ("Dereference before null check") > Fixes: 7d9c9b791f9e ("ice: Implement LFC workaround") > Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> > --- Thanks for the patch Yunjian. However, we do have a patch coming[1] that fixes this issue. Thanks, Tony [1] https://patchwork.ozlabs.org/project/intel-wired- lan/patch/20201012225326.15722-1-anthony.l.nguyen@intel.com/
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 6e251dfffc91..43117cb4ef18 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -788,11 +788,6 @@ static void ice_set_dflt_mib(struct ice_pf *pf) struct ice_hw *hw; u32 ouisubtype; - if (!pf) { - dev_dbg(dev, "%s NULL pf pointer\n", __func__); - return; - } - hw = &pf->hw; mib_type = SET_LOCAL_MIB_TYPE_LOCAL_MIB; lldpmib = kzalloc(ICE_LLDPDU_SIZE, GFP_KERNEL);