]> git.baikalelectronics.ru Git - kernel.git/commit
iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference
authorAtilla Filiz <atilla.filiz@essensium.com>
Fri, 11 Apr 2014 14:51:23 +0000 (16:51 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sat, 26 Apr 2014 10:14:51 +0000 (11:14 +0100)
commit8cf4141f5189c95545734d6df38f1fa116ef816b
tree09da1c68f682e1f5b4e4803591bd4857f7e79101
parent479d4480f3ea93ed411ff84bd77a00aa93f48f01
iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference

The driver segfaults when the kernel boots with device tree as the
platform data is then not present and the pointer is deferenced without
checking it is not null.  This patch introduces such a check avoiding the
crash.

Signed-off-by: Atilla Filiz <atilla.filiz@essensium.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Stable@vger.kernel.org
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c