From: Ajay.Kathat@microchip.com (Ajay.Kathat@microchip.com)
Subject: [bug report] staging: wilc1000: added support to dynamically add/remove interfaces
Date: Tue, 13 Aug 2019 06:25:58 +0000 [thread overview]
Message-ID: <6eb384fc-4acc-c9e4-2c15-c8862120c8ec@microchip.com> (raw)
In-Reply-To: <20190808104831.GA854@mwanda>
Hi Dan,
On 8/8/2019 4:18 PM, Dan Carpenter wrote:
>
> 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?
I think, returning value '0' is safe here. Only 'ENOBUFS' return value
is used for retry while other values are not considered. The 'if'
condition exit this function in case the list is empty. And later the
elements will be fetched again once'txq_event' completion signal is
received.
Regards,
Ajay
next prev parent reply other threads:[~2019-08-13 6:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 10:48 [bug report] staging: wilc1000: added support to dynamically add/remove interfaces Dan Carpenter
2019-08-13 6:25 ` Ajay.Kathat [this message]
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=6eb384fc-4acc-c9e4-2c15-c8862120c8ec@microchip.com \
--to=ajay.kathat@microchip.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).