lkml.org 
[lkml]   [2021]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] ALSA: usb-audio: Don't store returned value and check for errors
The returned value by create_autodetect_quirk isn't being used other
than in the success check on next line. Remove the return value
assignement. Check for error values instead of success check.

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

diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 9e5e37eff10e..5ce5f4ecb9d0 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -425,9 +425,9 @@ static int create_autodetect_quirks(struct snd_usb_audio *chip,
USB_CLASS_VENDOR_SPEC)
continue;

- err = create_autodetect_quirk(chip, iface, driver);
- if (err >= 0)
- usb_driver_claim_interface(driver, iface, (void *)-1L);
+ if (create_autodetect_quirk(chip, iface, driver) < 0)
+ continue;
+ usb_driver_claim_interface(driver, iface, (void *)-1L);
}

return 0;
--
2.25.1
\
 
 \ /
  Last update: 2021-03-25 09:38    [W:0.036 / U:1.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site