input: sensor-dev: fix smatch warning
authorHuang, Tao <huangtao@rock-chips.com>
Mon, 31 Oct 2016 07:58:33 +0000 (15:58 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 11 Nov 2016 08:20:46 +0000 (16:20 +0800)
commitb47b139d89065b8e669bd011a2f288286bd87917
tree321e02bfe9fe1bcc5f757667acf831927c31dcff
parenta352c9c98a709457afa9bf1fdf9a502e29b93241
input: sensor-dev: fix smatch warning

fix below warnings:
sensor-dev.c:1016 gyro_dev_ioctl() warn: inconsistent returns 'mutex:&sensor->operation_mutex'.
  Locked on:   line 973
               line 982
  Unlocked on: line 919
               line 1010
               line 1016
sensor-dev.c:1905 sensor_probe() error: potential null dereference 'sensor->input_dev'.  (input_allocate_device returns null)
sensor-dev.c:1905 sensor_probe() error: we previously assumed 'sensor->input_dev' could be null (see line 1902)
sensor-dev.c:2051 sensor_probe() error: don't call input_free_device() after input_unregister_device()
sensor-dev.c:2080 sensor_remove() error: don't call input_free_device() after input_unregister_device()

Change-Id: I7da8a337282df7f9b8e6474a68928fc53d4e6890
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 08fd14ea02692f43eaa8a166791cdaaa4b6c0738)
drivers/input/sensors/sensor-dev.c