mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-09-16 12:06:08 +10: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:
parent
9e1ee33363
commit
ecef14f70e
@ -215,6 +215,8 @@ static int __init omap_cf_probe(struct platform_device *pdev)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||||
|
if (!res)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
cf = kzalloc(sizeof *cf, GFP_KERNEL);
|
cf = kzalloc(sizeof *cf, GFP_KERNEL);
|
||||||
if (!cf)
|
if (!cf)
|
||||||
|
Loading…
Reference in New Issue
Block a user