diff options
| author | Tim Sell <[email protected]> | 2015-07-09 13:27:44 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2015-07-14 18:34:58 -0700 |
| commit | 5deeea3379b2fc34d07cfb909b2905e9e1116615 (patch) | |
| tree | 1e5f38342e235a5462448739ef4e999b7d6b6378 | |
| parent | d01da5eac098c4676dd5d296b5be5b0f988fc3c8 (diff) | |
staging: unisys: prevent faults in visornic_pause
Prevent faults in visornic_pause, visornic_resume(), and visornic_remove()
Prior to this patch, any call to visornic_pause(), visornic_resume(), or
visornic_remove() would fault, due to dev_set_drvdata() never having been
called to stash our struct visornic_devdata * into the device's drvdata.
I.e., all calls to dev_get_drvdata() were returning NULL, meaning a fault
was soon to follow.
Signed-off-by: Tim Sell <[email protected]>
Signed-off-by: Benjamin Romer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/staging/unisys/visornic/visornic_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index fa52e0fa5cbc..72253a07c255 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -1831,6 +1831,7 @@ static int visornic_probe(struct visor_device *dev) } devdata->netdev = netdev; + dev_set_drvdata(&dev->device, devdata); init_waitqueue_head(&devdata->rsp_queue); spin_lock_init(&devdata->priv_lock); devdata->enabled = 0; /* not yet */ |