mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
pcmcia: omap: Add missing check for platform_get_resource
Add missing check for platform_get_resource() and return error if it fails
to catch the error.
Fixes: d87d44f7ab ("ARM: omap1: move CF chipselect setup to board file")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
committed by
Dominik Brodowski
parent
9e1ee33363
commit
ecef14f70e
@@ -215,6 +215,8 @@ static int __init omap_cf_probe(struct platform_device *pdev)
|
||||
return -EINVAL;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!res)
|
||||
return -EINVAL;
|
||||
|
||||
cf = kzalloc(sizeof *cf, GFP_KERNEL);
|
||||
if (!cf)
|
||||
|
||||
Reference in New Issue
Block a user