iio: inv_mpu6050: Fix use-after-free in ACPI code
authorCrestez Dan Leonard <leonard.crestez@intel.com>
Fri, 3 Jun 2016 18:30:24 +0000 (21:30 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sat, 11 Jun 2016 16:20:27 +0000 (17:20 +0100)
commit6e85dbe4b461e59fa3cad6f6235cb47fa4c6a629
treedc8e9b4c1756106839dc3640112f67c4e0750996
parenta9cc4006155a68dd0940728f4f222dd035180904
iio: inv_mpu6050: Fix use-after-free in ACPI code

In some cases this can result in incorrectly returning a negative value
from asus_acpi_get_sensor_info and the AK8963 magnetometer failing to
show up.

Note cpm is an alias for buffer.pointer which isn't apparent in this
patch on it's own.

Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c