* [patch] [media] stk1160: remove unneeded check
@ 2012-08-14 7:03 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2012-08-14 7:03 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: Ezequiel Garcia, linux-media, kernel-janitors
"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;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-08-14 7:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-14 7:03 [patch] [media] stk1160: remove unneeded check Dan Carpenter
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).