aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBenjamin Tissoires <bentiss@kernel.org>2023-08-31 10:47:16 +0200
committerBenjamin Tissoires <bentiss@kernel.org>2023-08-31 10:47:16 +0200
commit2544f87721f0dccaa9e83a2b850924ec706a1edb (patch)
tree87b6b122d5abace4b59b14cda3dfa067e8e1466b
parentMerge branch 'for-6.6/wacom' into for-linus (diff)
parentHID: hid-wiimote-debug.c: Drop error checking for debugfs_create_file (diff)
downloadwireguard-linux-2544f87721f0dccaa9e83a2b850924ec706a1edb.tar.xz
wireguard-linux-2544f87721f0dccaa9e83a2b850924ec706a1edb.zip
Merge branch 'for-6.6/wiimote' into for-linus
Drop error checking for debugfs_create_file in the wiimote driver by Osama Muhammad
-rw-r--r--drivers/hid/hid-wiimote-debug.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/hid/hid-wiimote-debug.c b/drivers/hid/hid-wiimote-debug.c
index a99dcca2e099..00f9be55f148 100644
--- a/drivers/hid/hid-wiimote-debug.c
+++ b/drivers/hid/hid-wiimote-debug.c
@@ -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)
@@ -183,13 +182,9 @@ 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;
@@ -197,11 +192,6 @@ int wiidebug_init(struct wiimote_data *wdata)
return 0;
-err_drm:
- debugfs_remove(dbg->eeprom);
-err:
- kfree(dbg);
- return ret;
}
void wiidebug_deinit(struct wiimote_data *wdata)