mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 23:23:53 +02:00
misc: max9635: unregister upon probe failure
currently it only unregisters input device but not misc as a result in case if probe() fails it may cause a panic in ubsequently called ioctl where it would try to access unitialized/freed data Signed-off-by: Sergey Kudakov <sergey.kudakov@motorola.com>
This commit is contained in:
parent
b13ff560d8
commit
671ee8d974
|
|
@ -548,6 +548,7 @@ static int max9635_probe(struct i2c_client *client,
|
|||
err_reg_init_failed:
|
||||
input_unregister_device(als_data->idev);
|
||||
error_input_register_failed:
|
||||
misc_deregister(&max9635_misc_device);
|
||||
error_misc_register_failed:
|
||||
input_free_device(als_data->idev);
|
||||
error_input_allocate_failed:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user