Commit d918e0d5 authored by 蒋家盛's avatar 蒋家盛 Committed by Lee Jones
Browse files

mfd: intel-lpss: Add missing check for platform_get_resource



Add the missing check for platform_get_resource and return error
if it fails.

Fixes: 4b45efe8 ("mfd: Add support for Intel Sunrisepoint LPSS devices")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230609014818.28475-1-jiasheng@iscas.ac.cn
parent 6e9df38f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);