Skip to content

Commit

Permalink
Input: allow passing NULL to input_free_device()
Browse files Browse the repository at this point in the history
Many drivers rely on input_free_device() behaving like kfree().

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
  • Loading branch information
Dmitry Torokhov committed Apr 26, 2006
1 parent f11a7c0 commit 1a0ccec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,8 @@ static inline void input_put_device(struct input_dev *dev)

static inline void input_free_device(struct input_dev *dev)
{
input_put_device(dev);
if (dev)
input_put_device(dev);
}

int input_register_device(struct input_dev *);
Expand Down

0 comments on commit 1a0ccec

Please sign in to comment.