From: Dan Carpenter <error27@gmail.com>
To: cai.huoqing@linux.dev
Cc: kernel-janitors@vger.kernel.org
Subject: [bug report] net: hinic: Add support for configuration of rx-vlan-filter by ethtool
Date: Fri, 18 Nov 2022 14:20:55 +0300 [thread overview]
Message-ID: <Y3dql2JP3jyTBPYs@kili> (raw)
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
reply other threads:[~2022-11-18 11:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y3dql2JP3jyTBPYs@kili \
--to=error27@gmail.com \
--cc=cai.huoqing@linux.dev \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.