iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference
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 <26657c24d3dc0ffbac6871b68a76e9592a51d45b@essensium.com>
Signed-off-by: Jonathan Cameron <09f65b71b7655725897b2fd41a09a0cefe2e1ace@kernel.org>
Cc: d96e5b2dd07c1733b2b013bd82922c22baade37d@vger.kernel.org

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs