[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1231345279-26618-2-git-send-email-cooloney@kernel.org>
Date: Thu, 8 Jan 2009 00:21:18 +0800
From: Bryan Wu <cooloney@...nel.org>
To: gregkh@...e.de
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Bryan Wu <cooloney@...nel.org>
Subject: [PATCH 1/2] usb: composite: Fix bug: should test set_alt function pointer before use it
Signed-off-by: Bryan Wu <cooloney@...nel.org>
---
drivers/usb/gadget/composite.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index f2da026..363951e 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -772,7 +772,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
f = cdev->config->interface[w_index];
if (!f)
break;
- if (w_value && !f->get_alt)
+ if (w_value && !f->set_alt)
break;
value = f->set_alt(f, w_index, w_value);
break;
--
1.5.6
--
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