diff --git a/include/linux/input.h b/include/linux/input.h index b0e612dda0cf2887e364f95010f136d87be2fdcd..16c19d710a4dcce2d6b666a9e10920f6c042b876 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 *);