public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: coverity-bot <keescook@chromium.org>
To: Daniel Drake <dsd@laptop.org>
Cc: linux-kernel@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Kalle Valo <kvalo@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	linux-next@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Coverity: if_sdio_reset_card_worker(): Error handling issues
Date: Thu, 10 Nov 2022 08:29:19 -0800	[thread overview]
Message-ID: <202211100829.34D7E6894@keescook> (raw)

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20221110 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Fri Jun 10 14:57:47 2011 -0400
    9a821f5d0fc3 ("libertas: add sd8686 reset_card support")

Coverity reported the following:

*** CID 1527255:  Error handling issues  (CHECKED_RETURN)
drivers/net/wireless/marvell/libertas/if_sdio.c:1048 in if_sdio_reset_card_worker()
1042     	 * We run it in a workqueue totally independent from the if_sdio_card
1043     	 * instance for that reason.
1044     	 */
1045
1046     	pr_info("Resetting card...");
1047     	mmc_remove_host(reset_host);
vvv     CID 1527255:  Error handling issues  (CHECKED_RETURN)
vvv     Calling "mmc_add_host" without checking return value (as is done elsewhere 27 out of 32 times).
1048     	mmc_add_host(reset_host);
1049     }
1050     static DECLARE_WORK(card_reset_work, if_sdio_reset_card_worker);
1051
1052     static void if_sdio_reset_card(struct lbs_private *priv)
1053     {

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1527255 ("Error handling issues")
Fixes: 9a821f5d0fc3 ("libertas: add sd8686 reset_card support")

Thanks for your attention!

-- 
Coverity-bot

                 reply	other threads:[~2022-11-10 16:29 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=202211100829.34D7E6894@keescook \
    --to=keescook@chromium.org \
    --cc=davem@davemloft.net \
    --cc=dsd@laptop.org \
    --cc=edumazet@google.com \
    --cc=gustavo@embeddedor.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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