projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03c765b
)
ACPI: LPSS: Fix missing check in register_device_clock()
author
huhai
<huhai@kylinos.cn>
Thu, 23 Jun 2022 13:21:27 +0000
(21:21 +0800)
committer
Rafael J. Wysocki
<rafael.j.wysocki@intel.com>
Wed, 29 Jun 2022 18:18:22 +0000
(20:18 +0200)
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>
drivers/acpi/acpi_lpss.c
patch
|
blob
|
history
diff --git
a/drivers/acpi/acpi_lpss.c
b/drivers/acpi/acpi_lpss.c
index fbe0756259c5a72bc962a06363fb201b77a1e0eb..c4d4d21391d7b11e8d072d8e6fd16cf067df94ac 100644
(file)
--- a/
drivers/acpi/acpi_lpss.c
+++ b/
drivers/acpi/acpi_lpss.c
@@
-422,6
+422,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;