[PATCH] ALSA: usb-audio: Fix missing return assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Return value of usb_driver_claim_interface should not be ignored.
Instead it should be stored in err variable and returned from
this function.

Signed-off-by: Muhammad Usama Anjum <musamaanjum@xxxxxxxxx>
---
 sound/usb/quirks.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 9e5e37eff10e..dd32ceaef18a 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -427,10 +427,10 @@ static int create_autodetect_quirks(struct snd_usb_audio *chip,
 
 		err = create_autodetect_quirk(chip, iface, driver);
 		if (err >= 0)
-			usb_driver_claim_interface(driver, iface, (void *)-1L);
+			err = usb_driver_claim_interface(driver, iface, (void *)-1L);
 	}
 
-	return 0;
+	return err;
 }
 
 /*
-- 
2.25.1




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux