From: Colin Ian King Date: Mon, 25 Mar 2013 10:50:06 +0000 (+0000) Subject: ACPI / processor_thermal: avoid null pointer deference error X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~92^2~6^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99aa36386351488d12ad5d302e096a77f22705d9;p=pandora-kernel.git ACPI / processor_thermal: avoid null pointer deference error Fix a null pointer deference by acpi_driver_data() if device is null. We should only set pr and check this is OK after we are sure device is not null. Smatch analysis: drivers/acpi/processor_thermal.c:223 processor_get_max_state() warn: variable dereferenced before check 'device' (see line 221) drivers/acpi/processor_thermal.c:237 processor_get_cur_state() warn: variable dereferenced before check 'device' (see line 235) drivers/acpi/processor_thermal.c:255 processor_set_cur_state() warn: variable dereferenced before check 'device' (see line 251) Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed