Skip to content

Commit

Permalink
Merge branch 'for-6.6/wiimote' into for-linus
Browse files Browse the repository at this point in the history
Drop error checking for debugfs_create_file in the wiimote driver
by Osama Muhammad
  • Loading branch information
Benjamin Tissoires committed Aug 31, 2023
2 parents d4de578 + 9620a78 commit 2544f87
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions drivers/hid/hid-wiimote-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ int wiidebug_init(struct wiimote_data *wdata)
{
struct wiimote_debug *dbg;
unsigned long flags;
int ret = -ENOMEM;

dbg = kzalloc(sizeof(*dbg), GFP_KERNEL);
if (!dbg)
Expand All @@ -183,25 +182,16 @@ int wiidebug_init(struct wiimote_data *wdata)

dbg->eeprom = debugfs_create_file("eeprom", S_IRUSR,
dbg->wdata->hdev->debug_dir, dbg, &wiidebug_eeprom_fops);
if (!dbg->eeprom)
goto err;

dbg->drm = debugfs_create_file("drm", S_IRUSR,
dbg->wdata->hdev->debug_dir, dbg, &wiidebug_drm_fops);
if (!dbg->drm)
goto err_drm;

spin_lock_irqsave(&wdata->state.lock, flags);
wdata->debug = dbg;
spin_unlock_irqrestore(&wdata->state.lock, flags);

return 0;

err_drm:
debugfs_remove(dbg->eeprom);
err:
kfree(dbg);
return ret;
}

void wiidebug_deinit(struct wiimote_data *wdata)
Expand Down

0 comments on commit 2544f87

Please sign in to comment.