From: Dan Carpenter Date: Tue, 14 Aug 2012 06:03:35 +0000 (-0300) Subject: [media] stk1160: remove unneeded check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0590c7130dfb88ddc7bbecd343efae1d3623f209;p=linux-beck.git [media] stk1160: remove unneeded check "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 Acked-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/stk1160/stk1160-ac97.c b/drivers/media/usb/stk1160/stk1160-ac97.c index 8d325f50c87b..c8583c262c3d 100644 --- a/drivers/media/usb/stk1160/stk1160-ac97.c +++ b/drivers/media/usb/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; }