Skip to content

Commit 2544f87

Browse files
author
Benjamin Tissoires
committed
Merge branch 'for-6.6/wiimote' into for-linus
Drop error checking for debugfs_create_file in the wiimote driver by Osama Muhammad
2 parents d4de578 + 9620a78 commit 2544f87

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

drivers/hid/hid-wiimote-debug.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ int wiidebug_init(struct wiimote_data *wdata)
173173
{
174174
struct wiimote_debug *dbg;
175175
unsigned long flags;
176-
int ret = -ENOMEM;
177176

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

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

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

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

198193
return 0;
199194

200-
err_drm:
201-
debugfs_remove(dbg->eeprom);
202-
err:
203-
kfree(dbg);
204-
return ret;
205195
}
206196

207197
void wiidebug_deinit(struct wiimote_data *wdata)

0 commit comments

Comments
 (0)