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)