mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
mfd: intel-lpss: Add missing check for platform_get_resource
[ Upstream commitd918e0d582] Add the missing check for platform_get_resource and return error if it fails. Fixes:4b45efe852("mfd: Add support for Intel Sunrisepoint LPSS devices") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/20230609014818.28475-1-jiasheng@iscas.ac.cn Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0e8b1a2835
commit
76ac2acb75
@@ -148,6 +148,9 @@ static int intel_lpss_acpi_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
info->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!info->mem)
|
||||
return -ENODEV;
|
||||
|
||||
info->irq = platform_get_irq(pdev, 0);
|
||||
|
||||
ret = intel_lpss_probe(&pdev->dev, info);
|
||||
|
||||
Reference in New Issue
Block a user