]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb: midi: don't return -ENOMEM when usb_urb_ep_type_check fails
authorColin Ian King <colin.king@canonical.com>
Tue, 20 Apr 2021 13:47:19 +0000 (14:47 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 20 Apr 2021 14:59:10 +0000 (16:59 +0200)
commit7bb8775d03b62b0345217fb303070a2dce814227
treedc42218b7bfc6de9bcf90cf0de1ec7213ae205ac
parent9c158cec5019bf4dd9cc35df880f411f6b722aff
ALSA: usb: midi: don't return -ENOMEM when usb_urb_ep_type_check fails

Currently when the call to usb_urb_ep_type_check fails (returning -EINVAL)
the error return path returns -ENOMEM via the exit label "error". Other
uses of the same error exit label set the err variable to -ENOMEM but this
is not being used.  I believe the original intent was for the error exit
path to return the value in err rather than the hard coded -ENOMEM, so
return this rather than the hard coded -ENOMEM.

Addresses-Coverity: ("Unused value")
Fixes: 83bc630e649f ("ALSA: usb-audio: Add sanity checks for invalid EPs")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210420134719.381409-1-colin.king@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/midi.c