提交 85054b21 编写于 作者: D Dan Carpenter 提交者: Takashi Iwai

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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 da7db6ad
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册