diff options
author | huhai <huhai@kylinos.cn> | 2022-06-23 21:21:27 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-25 11:11:14 +0200 |
commit | 15583c70e795a430db120160c70dd3aec8577f2f (patch) | |
tree | 37a2f8818364b9556786e3ee92ae3dec63159992 | |
parent | bfbcbb63f25056325e82b1150ec76de15679106e (diff) | |
download | linux-rt-15583c70e795a430db120160c70dd3aec8577f2f.tar.gz |
ACPI: LPSS: Fix missing check in register_device_clock()
[ Upstream commit b4f1f61ed5928b1128e60e38d0dffa16966f06dc ]
register_device_clock() misses a check for platform_device_register_simple().
Add a check to fix it.
Signed-off-by: huhai <huhai@kylinos.cn>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/acpi/acpi_lpss.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index 84b1d30f699c..faa83ff03674 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -396,6 +396,9 @@ static int register_device_clock(struct acpi_device *adev, if (!lpss_clk_dev) lpt_register_clock_device(); + if (IS_ERR(lpss_clk_dev)) + return PTR_ERR(lpss_clk_dev); + clk_data = platform_get_drvdata(lpss_clk_dev); if (!clk_data) return -ENODEV; |