Netdev List
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: vladimir.oltean@nxp.com
Cc: netdev@vger.kernel.org
Subject: [bug report] net: enetc: reimplement RFS/RSS memory clearing as PCI quirk
Date: Wed, 6 Sep 2023 14:48:20 +0300	[thread overview]
Message-ID: <582183ef-e03b-402b-8e2d-6d9bb3c83bd9@moroto.mountain> (raw)

Hello Vladimir Oltean,

The patch f0168042a212: "net: enetc: reimplement RFS/RSS memory
clearing as PCI quirk" from Aug 3, 2023 (linux-next), leads to the
following Smatch static checker warning:

	drivers/net/ethernet/freescale/enetc/enetc_pf.c:1405 enetc_fixup_clear_rss_rfs()
	warn: 'si' is an error pointer or valid

drivers/net/ethernet/freescale/enetc/enetc_pf.c
    1393 static void enetc_fixup_clear_rss_rfs(struct pci_dev *pdev)
    1394 {
    1395         struct device_node *node = pdev->dev.of_node;
    1396         struct enetc_si *si;
    1397 
    1398         /* Only apply quirk for disabled functions. For the ones
    1399          * that are enabled, enetc_pf_probe() will apply it.
    1400          */
    1401         if (node && of_device_is_available(node))
    1402                 return;
    1403 
    1404         si = enetc_psi_create(pdev);
--> 1405         if (si)

I guess this should be if (!IS_ERR(si)) {?

    1406                 enetc_psi_destroy(pdev);
    1407 }

regards,
dan carpenter

             reply	other threads:[~2023-09-06 11:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 11:48 Dan Carpenter [this message]
2023-09-06 14:16 ` [bug report] net: enetc: reimplement RFS/RSS memory clearing as PCI quirk Vladimir Oltean

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=582183ef-e03b-402b-8e2d-6d9bb3c83bd9@moroto.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=vladimir.oltean@nxp.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox