Linux wireless drivers development
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Jeff Chen <jeff.chen_1@nxp.com>
Cc: linux-wireless@vger.kernel.org
Subject: [bug report] wifi: nxp: add nxpwifi driver for IW61x
Date: Wed, 12 Aug 2026 11:11:19 +0300	[thread overview]
Message-ID: <anwqp-LuExbRshYu@stanley.mountain> (raw)

Hello Jeff Chen,

Commit 73b01e57ed3e ("wifi: nxp: add nxpwifi driver for IW61x") from
Jun 5, 2026 (linux-next), leads to the following Smatch static
checker warning:

	drivers/net/wireless/nxp/nxpwifi/cfg80211.c:850 nxpwifi_change_vif_to_sta()
	warn: duplicate check 'ret' (previous on line 840)

drivers/net/wireless/nxp/nxpwifi/cfg80211.c
    816 static int
    817 nxpwifi_change_vif_to_sta(struct net_device *dev,
    818                           enum nl80211_iftype curr_iftype,
    819                           enum nl80211_iftype type,
    820                           struct vif_params *params)
    821 {
    822         struct nxpwifi_private *priv;
    823         struct nxpwifi_adapter *adapter;
    824         int ret;
    825 
    826         priv = nxpwifi_netdev_get_priv(dev);
    827 
    828         if (!priv)
    829                 return -EINVAL;
    830 
    831         adapter = priv->adapter;
    832 
    833         nxpwifi_dbg(adapter, INFO,
    834                     "%s: changing role to station\n", dev->name);
    835 
    836         ret = nxpwifi_deinit_priv_params(priv);
    837         if (ret)
    838                 goto done;
    839         ret = nxpwifi_init_new_priv_params(priv, dev, type);
    840         if (ret)
    841                 goto done;
    842 
    843         update_vif_type_counter(adapter, curr_iftype, -1);
    844         update_vif_type_counter(adapter, type, 1);
    845         dev->ieee80211_ptr->iftype = type;
    846 
    847         if (nxpwifi_set_bss_mode(priv))
    848                 return -1;

Was this supposed to be?

	ret = nxpwifi_set_bss_mode(priv);

    849 
--> 850         if (ret)
    851                 goto done;

Dead code.

    852 
    853         ret = nxpwifi_sta_init_cmd(priv, false, false);
    854 
    855 done:
    856         return ret;
    857 }

This email is a free service from the Smatch-CI project [smatch.sf.net].

regards,
dan carpenter

             reply	other threads:[~2026-08-12  8:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12  8:11 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-08-12  8:19 [bug report] wifi: nxp: add nxpwifi driver for IW61x Dan Carpenter

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=anwqp-LuExbRshYu@stanley.mountain \
    --to=error27@gmail.com \
    --cc=jeff.chen_1@nxp.com \
    --cc=linux-wireless@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox