diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-07-28 23:27:38 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-07-29 13:59:47 +0200 |
commit | 85054b2153f18eac16df9ff88913c98adea6a23e (patch) | |
tree | 24ad3ecc343b8eb4bf0fa77d667d162aad2b58a5 /sound/usb/usx2y | |
parent | da7db6ad4da05a3109d0a31100e1ecd746a90fee (diff) |
ALSA: usx2y: remove an unneeded check
The test here is always true because S[i].urb is an array not a pointer.
Also it's bogus because the intent was to test:
if (S->urb[i]) {
instead of:
if (S[i].urb) {
Anyway, usb_kill_urb() and usb_free_urb() accept NULL pointers so we can
just remove this.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usx2y')
-rw-r--r-- | sound/usb/usx2y/usbusx2y.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c index 1f9bbd55553f..5a51b18c50fe 100644 --- a/sound/usb/usx2y/usbusx2y.c +++ b/sound/usb/usx2y/usbusx2y.c @@ -305,11 +305,9 @@ static void usX2Y_unlinkSeq(struct snd_usX2Y_AsyncSeq *S) { int i; for (i = 0; i < URBS_AsyncSeq; ++i) { - if (S[i].urb) { - usb_kill_urb(S->urb[i]); - usb_free_urb(S->urb[i]); - S->urb[i] = NULL; - } + usb_kill_urb(S->urb[i]); + usb_free_urb(S->urb[i]); + S->urb[i] = NULL; } kfree(S->buffer); } |