iio: hid-sensor: Return proper error if kmemdup fails
authorAxel Lin <axel.lin@ingics.com>
Sat, 27 Oct 2012 15:03:00 +0000 (16:03 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 17 Nov 2012 10:17:28 +0000 (10:17 +0000)
commit64ebe955f9447fcecf65360ec3bc332f4ec411b6
tree73ef17a2dd1c4f6958facd12b2516c55342f454a
parent95273f8952a7e3a037e139eec0aa99872f086498
iio: hid-sensor: Return proper error if kmemdup fails

Return -ENOMEM instead of 0 if kmemdup fails.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/hid-sensor-accel-3d.c
drivers/iio/gyro/hid-sensor-gyro-3d.c
drivers/iio/light/hid-sensor-als.c
drivers/iio/magnetometer/hid-sensor-magn-3d.c