提交 1a0ccece 编写于 作者: D Dmitry Torokhov

Input: allow passing NULL to input_free_device()

Many drivers rely on input_free_device() behaving like kfree().
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 f11a7c09
......@@ -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 *);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册