summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorDavid Kershner <david.kershner@unisys.com>2015-09-04 12:01:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-13 09:43:40 -0700
commit5b12100a53c11ef760e78c2899be8f1bf33812ca (patch)
tree769e7d7983c10d110392d38d2c26f13c85953617 /drivers/staging
parentdd3afa57c515801f37071734f56be9035fdeaa8c (diff)
downloadop-kernel-dev-5b12100a53c11ef760e78c2899be8f1bf33812ca.zip
op-kernel-dev-5b12100a53c11ef760e78c2899be8f1bf33812ca.tar.gz
staging: unisys: unregister netdev when create debugfs fails
Noticed we were not unregistering the netdevice if we failed to create the debugfs entries. This patch fixes that problem. Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/unisys/visornic/visornic_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 8c9da7e..bacf1af 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -1924,13 +1924,16 @@ static int visornic_probe(struct visor_device *dev)
"%s debugfs_create_dir %s failed\n",
__func__, netdev->name);
err = -ENOMEM;
- goto cleanup_xmit_cmdrsp;
+ goto cleanup_register_netdev;
}
dev_info(&dev->device, "%s success netdev=%s\n",
__func__, netdev->name);
return 0;
+cleanup_register_netdev:
+ unregister_netdev(netdev);
+
cleanup_napi_add:
del_timer_sync(&devdata->irq_poll_timer);
netif_napi_del(&devdata->napi);
OpenPOWER on IntegriCloud