Skip to content

Commit

Permalink
Use global error if dev is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Megamouse committed Oct 3, 2024
1 parent 5340bbf commit df576f8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
5 changes: 0 additions & 5 deletions linux/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
5 changes: 0 additions & 5 deletions mac/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit df576f8

Please sign in to comment.