From: Dan Carpenter <dan.carpenter@oracle.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Ezequiel Garcia <elezegarcia@gmail.com>,
linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] [media] stk1160: remove unneeded check
Date: Tue, 14 Aug 2012 10:03:35 +0300 [thread overview]
Message-ID: <20120814070335.GE4791@elgon.mountain> (raw)
"card" is a valid pointer here because we checked snd_card_create() for
error returns. Checking after a dereference makes the static checkers
complain.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Only needed on linux-next.
diff --git a/drivers/media/video/stk1160/stk1160-ac97.c b/drivers/media/video/stk1160/stk1160-ac97.c
index 8d325f5..c8583c2 100644
--- a/drivers/media/video/stk1160/stk1160-ac97.c
+++ b/drivers/media/video/stk1160/stk1160-ac97.c
@@ -133,8 +133,7 @@ int stk1160_ac97_register(struct stk1160 *dev)
err:
dev->snd_card = NULL;
- if (card)
- snd_card_free(card);
+ snd_card_free(card);
return rc;
}
reply other threads:[~2012-08-14 7:03 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=20120814070335.GE4791@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=elezegarcia@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.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;
as well as URLs for NNTP newsgroup(s).