Skip to content

Commit

Permalink
[media] stk1160: remove unneeded check
Browse files Browse the repository at this point in the history
"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>
Acked-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Aug 15, 2012
1 parent f367cc1 commit 0590c71
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/usb/stk1160/stk1160-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0590c71

Please sign in to comment.