git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mmc: ushc: fix NULL-deref at probe
[pandora-kernel.git]
/
drivers
/
mmc
/
host
/
ushc.c
diff --git
a/drivers/mmc/host/ushc.c
b/drivers/mmc/host/ushc.c
index
f08f944
..
82f5726
100644
(file)
--- a/
drivers/mmc/host/ushc.c
+++ b/
drivers/mmc/host/ushc.c
@@
-426,6
+426,9
@@
static int ushc_probe(struct usb_interface *intf, const struct usb_device_id *id
struct ushc_data *ushc;
int ret;
+ if (intf->cur_altsetting->desc.bNumEndpoints < 1)
+ return -ENODEV;
+
mmc = mmc_alloc_host(sizeof(struct ushc_data), &intf->dev);
if (mmc == NULL)
return -ENOMEM;