[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CA3CA3C.4080709@gmail.com>
Date: Thu, 30 Sep 2010 01:22:36 +0200
From: Roel Kluin <roel.kluin@...il.com>
To: David Brownell <dbrownell@...rs.sourceforge.net>,
linux-usb@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] USB: Don't dereference snd->filp
Don't dereference snd->filp.
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
drivers/usb/gadget/u_audio.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Or should it return the error pointer?
diff --git a/drivers/usb/gadget/u_audio.c b/drivers/usb/gadget/u_audio.c
index 7a86d2c..38d0305 100644
--- a/drivers/usb/gadget/u_audio.c
+++ b/drivers/usb/gadget/u_audio.c
@@ -242,6 +242,7 @@ static int gaudio_open_snd_dev(struct gaudio *card)
if (IS_ERR(snd->filp)) {
ERROR(card, "No such PCM playback device: %s\n", fn_play);
snd->filp = NULL;
+ return 0;
}
pcm_file = snd->filp->private_data;
snd->substream = pcm_file->substream;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists