mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
f11a7c0935
commit
1a0ccece05
1 changed files with 2 additions and 1 deletions
|
@ -1016,7 +1016,8 @@ static inline void input_put_device(struct input_dev *dev)
|
||||||
|
|
||||||
static inline void input_free_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 *);
|
int input_register_device(struct input_dev *);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue