summaryrefslogtreecommitdiff
path: root/drivers/usb/misc/brcmstb-usb-pinmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/misc/brcmstb-usb-pinmap.c')
-rw-r--r--drivers/usb/misc/brcmstb-usb-pinmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/misc/brcmstb-usb-pinmap.c b/drivers/usb/misc/brcmstb-usb-pinmap.c
index b3cfe8666ea7..336653091e3b 100644
--- a/drivers/usb/misc/brcmstb-usb-pinmap.c
+++ b/drivers/usb/misc/brcmstb-usb-pinmap.c
@@ -263,6 +263,8 @@ static int __init brcmstb_usb_pinmap_probe(struct platform_device *pdev)
return -EINVAL;
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!r)
+ return -EINVAL;
pdata = devm_kzalloc(&pdev->dev,
sizeof(*pdata) +