diff --git a/linux/hid.c b/linux/hid.c index 954d4151..c9c09d8f 100644 --- a/linux/hid.c +++ b/linux/hid.c @@ -171,11 +171,6 @@ static void register_global_error_format(const char *format, ...) * Use register_device_error(dev, NULL) to indicate "no error". */ static void register_device_error(hid_device *dev, const char *msg) { - if (!dev) { - register_global_error(msg); - return; - } - register_error_str(&dev->last_error_str, msg); } diff --git a/mac/hid.c b/mac/hid.c index b1136b88..8e4c926a 100644 --- a/mac/hid.c +++ b/mac/hid.c @@ -276,11 +276,6 @@ static void register_global_error_format(const char *format, ...) * Use register_device_error(dev, NULL) to indicate "no error". */ static void register_device_error(hid_device *dev, const char *msg) { - if (!dev) { - register_global_error(msg); - return; - } - register_error_str(&dev->last_error_str, msg); }