Skip to content
Commit 2cea3ec5 authored by 蒋家盛's avatar 蒋家盛 Committed by Rafael J. Wysocki
Browse files

ACPI: APD: Check for NULL pointer after calling devm_ioremap()



Because devres_alloc() may fail, devm_ioremap() may return NULL.

Then, 'clk_data->base' will be assigned to clkdev->data->base in
platform_device_register_data().

The PTR_ERR_OR_ZERO() check on clk_data does not cover 'base', so
it is better to add an explicit check against NULL after updating
it.

Fixes: 3f4ba94e ("ACPI: APD: Add AMD misc clock handler support")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@iscas.ac.cn>
[ rjw: Changelog rewrite ]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent bca21755
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment