[PATCH] Replaced 'return NULL' lines by break in snd_usb_find_desc so there is only one default error.

Andreas Bergmeier lcid-fire at gmx.net
Sat Jan 24 12:16:16 CET 2009


Signed-off-by: Andreas Bergmeier <lcid-fire at gmx.net>
---
 sound/usb/usbaudio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index d35b51c..8b8eb9e 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -2054,10 +2054,10 @@ void *snd_usb_find_desc(void *descstart, int desclen, void *after, u8 dtype)
 	end = p + desclen;
 	for (; p < end;) {
 		if (p[0] < 2)
-			return NULL;
+			break;
 		next = p + p[0];
 		if (next > end)
-			return NULL;
+			break;
 		if (p[1] == dtype && (!after || (void *)p > after)) {
 			return p;
 		}
-- 
1.5.6.3


--------------050806070602090407040706--


More information about the Alsa-devel mailing list