* [bug report] net: hinic: Add support for configuration of rx-vlan-filter by ethtool
@ 2022-11-18 11:20 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2022-11-18 11:20 UTC (permalink / raw)
To: cai.huoqing; +Cc: kernel-janitors
Hello Cai Huoqing,
This is a semi-automatic email about new static checker warnings.
The patch 2acf960e3be6: "net: hinic: Add support for configuration of
rx-vlan-filter by ethtool" from Nov 3, 2022, leads to the following
Smatch complaint:
drivers/net/ethernet/huawei/hinic/hinic_port.c:459 hinic_set_vlan_fliter()
^^^^
This should be "filter" instead of "fliter" (swap the li).
warn: variable dereferenced before check 'hwdev' (see line 453)
drivers/net/ethernet/huawei/hinic/hinic_port.c
452 struct hinic_hwdev *hwdev = nic_dev->hwdev;
453 struct hinic_hwif *hwif = hwdev->hwif;
^^^^^^^^^^^
Dereference.
454 struct pci_dev *pdev = hwif->pdev;
455 struct hinic_vlan_filter vlan_filter;
456 u16 out_size = sizeof(vlan_filter);
457 int err;
458
459 if (!hwdev)
^^^^^^
Checked too late.
460 return -EINVAL;
461
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-18 11:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-18 11:20 [bug report] net: hinic: Add support for configuration of rx-vlan-filter by ethtool Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.