OMAP: PM: SmartReflex: Fix possible null pointer read access
authorStefan Weil <weil@mail.berlios.de>
Sun, 30 Jan 2011 19:29:38 +0000 (20:29 +0100)
committerKevin Hilman <khilman@ti.com>
Mon, 31 Jan 2011 20:59:15 +0000 (12:59 -0800)
commit8353584eae4af8f37e5a23b63ed816c79185a9c9
tree30e6b3a32c97b6347a6dcd109352ef08766642c3
parent720bc782249015a30438516cee5c4be180a3f675
OMAP: PM: SmartReflex: Fix possible null pointer read access

These errors were found by cppcheck:
arch/arm/mach-omap2/smartreflex.c:784: error: Possible null pointer dereference: sr_info
arch/arm/mach-omap2/smartreflex.c:799: error: Possible null pointer dereference: sr_info

Both conditional statements are executed when sr_info == NULL,
so accessing sr_info->voltdm would fail.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/smartreflex.c