summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys
diff options
context:
space:
mode:
authorTim Sell <Timothy.Sell@unisys.com>2015-07-09 13:27:50 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-14 18:34:59 -0700
commit1a2e3e3d0992ced8eeb4cfbf228f617ad08afbf1 (patch)
tree0de6fd83b95d7ca2eb4e742e9e6e627d676a6a9b /drivers/staging/unisys
parent3798ff31d1fb1ee33de619ffc81a6a56c3ccb973 (diff)
downloadlinux-1a2e3e3d0992ced8eeb4cfbf228f617ad08afbf1.tar.bz2
staging: unisys: visornic: delay start of worker thread until netdev created
This only makes sense, since the worker thread depends upon the netdev existing. Signed-off-by: Tim Sell <Timothy.Sell@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/unisys')
-rw-r--r--drivers/staging/unisys/visornic/visornic_main.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 14977ad356cf..07e89ad92a66 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -1978,15 +1978,11 @@ static int visornic_probe(struct visor_device *dev)
goto cleanup_xmit_cmdrsp;
}
- devdata->thread_wait_ms = 2;
- visor_thread_start(&devdata->threadinfo, process_incoming_rsps,
- devdata, "vnic_incoming");
-
err = register_netdev(netdev);
if (err) {
dev_err(&dev->device,
"%s register_netdev failed (%d)\n", __func__, err);
- goto cleanup_thread_stop;
+ goto cleanup_xmit_cmdrsp;
}
/* create debgug/sysfs directories */
@@ -1997,16 +1993,17 @@ static int visornic_probe(struct visor_device *dev)
"%s debugfs_create_dir %s failed\n",
__func__, netdev->name);
err = -ENOMEM;
- goto cleanup_thread_stop;
+ goto cleanup_xmit_cmdrsp;
}
+ devdata->thread_wait_ms = 2;
+ visor_thread_start(&devdata->threadinfo, process_incoming_rsps,
+ devdata, "vnic_incoming");
+
dev_info(&dev->device, "%s success netdev=%s\n",
__func__, netdev->name);
return 0;
-cleanup_thread_stop:
- visor_thread_stop(&devdata->threadinfo);
-
cleanup_xmit_cmdrsp:
kfree(devdata->xmit_cmdrsp);