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