projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e9df38
)
mfd: intel-lpss: Add missing check for platform_get_resource
author
Jiasheng Jiang
<jiasheng@iscas.ac.cn>
Fri, 9 Jun 2023 01:48:18 +0000
(09:48 +0800)
committer
Lee Jones
<lee@kernel.org>
Thu, 15 Jun 2023 08:19:39 +0000
(09:19 +0100)
Add the missing check for platform_get_resource and return error
if it fails.
Fixes: 4b45efe85263 ("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
drivers/mfd/intel-lpss-acpi.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/intel-lpss-acpi.c
b/drivers/mfd/intel-lpss-acpi.c
index a143c8dca2d93b4cb7cb88d0651abb8270e054e8..212818aef93e20859227209b8143af55b1dec412 100644
(file)
--- a/
drivers/mfd/intel-lpss-acpi.c
+++ b/
drivers/mfd/intel-lpss-acpi.c
@@
-183,6
+183,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);