ACPI: LPSS: Fix missing check in register_device_clock()
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>
This commit is contained in:
parent
03c765b0e3
commit
b4f1f61ed5
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue