Skip to content

Commit

Permalink
Input: mpu3050 - correct call to input_free_device
Browse files Browse the repository at this point in the history
input_free_device() should be used if input_register_device() was not called
yet or if it failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Axel Lin authored and Dmitry Torokhov committed Aug 11, 2011
1 parent db0b34b commit d9b830f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/misc/mpu3050.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ static int __devinit mpu3050_probe(struct i2c_client *client,
err_pm_set_suspended:
pm_runtime_set_suspended(&client->dev);
err_free_mem:
input_unregister_device(idev);
input_free_device(idev);
kfree(sensor);
return error;
}
Expand Down

0 comments on commit d9b830f

Please sign in to comment.