"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 <[email protected]>
---
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;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to