mirror of https://github.com/torvalds/linux.git
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:
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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue