diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-04-26 00:13:57 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-04-26 00:13:57 -0400 |
commit | 1a0ccece05efb8a9c04b1130c24a2652239f3bea (patch) | |
tree | 7af7ed40dec393a91f81d8942e9ffda1c936e0ec /include/linux/input.h | |
parent | f11a7c0935637c15416679bd347bbc4eac1ca740 (diff) |
Input: allow passing NULL to input_free_device()
Many drivers rely on input_free_device() behaving like kfree().
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/input.h')
-rw-r--r-- | include/linux/input.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/input.h b/include/linux/input.h index b0e612dda0cf..16c19d710a4d 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -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 *); |