driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: dan.carpenter@oracle.com (Dan Carpenter)
Subject: [bug report] staging: wilc1000: added support to dynamically add/remove interfaces
Date: Thu, 8 Aug 2019 13:48:31 +0300	[thread overview]
Message-ID: <20190808104831.GA854@mwanda> (raw)

Hello Ajay Singh,

The patch 9bc061e88054: "staging: wilc1000: added support to
dynamically add/remove interfaces" from Jun 26, 2019, leads to the
following static checker warning:

	drivers/staging/wilc1000/wilc_wlan.c:497 wilc_wlan_handle_txq()
	warn: missing error code here? 'wilc_wlan_txq_get_first()' failed.

drivers/staging/wilc1000/wilc_wlan.c
   474  int wilc_wlan_handle_txq(struct wilc *wilc, u32 *txq_count)
   475  {
   476          int i, entries = 0;
   477          u32 sum;
   478          u32 reg;
   479          u32 offset = 0;
   480          int vmm_sz = 0;
   481          struct txq_entry_t *tqe;
   482          int ret = 0;
                    ^^^^^^^

   483          int counter;
   484          int timeout;
   485          u32 vmm_table[WILC_VMM_TBL_SIZE];
   486          const struct wilc_hif_func *func;
   487          u8 *txb = wilc->tx_buffer;
   488          struct net_device *dev;
   489          struct wilc_vif *vif;
   490  
   491          if (wilc->quit)
   492                  goto out;
   493  
   494          mutex_lock(&wilc->txq_add_to_head_cs);
   495          tqe = wilc_wlan_txq_get_first(wilc);
   496          if (!tqe)
   497                  goto out;
                        ^^^^^^^^
Should this really be a success path?

   498          dev = tqe->vif->ndev;
   499          wilc_wlan_txq_filter_dup_tcp_ack(dev);
   500          i = 0;
   501          sum = 0;
   502          do {
   503                  if (tqe && (i < (WILC_VMM_TBL_SIZE - 1))) {

regards,
dan carpenter

             reply	other threads:[~2019-08-08 10:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 10:48 Dan Carpenter [this message]
2019-08-13  6:25 ` [bug report] staging: wilc1000: added support to dynamically add/remove interfaces Ajay.Kathat
2019-11-13 18:33 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=20190808104831.GA854@mwanda \
    --to=dan.carpenter@oracle.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;
as well as URLs for NNTP newsgroup(s).