Message ID | 20120814070335.GE4791@elgon.mountain (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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; }
"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. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html