ACPI: processor: idle: Check acpi_fetch_acpi_dev() return value

[ Upstream commit 2437513a81 ]

The return value of acpi_fetch_acpi_dev() could be NULL, which would
cause a NULL pointer dereference to occur in acpi_device_hid().

Signed-off-by: Li Zhong <floridsleeves@gmail.com>
[ rjw: Subject and changelog edits, added empty line after if () ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Li Zhong 2022-09-02 00:37:30 -07:00 • committed by Greg Kroah-Hartman
commit b85f0e292f