summaryrefslogtreecommitdiff
path: root/drivers/staging/unisys
diff options
context:
space:
mode:
authorDavid Kershner <david.kershner@unisys.com>2017-03-28 09:34:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-29 09:17:03 +0200
commitb90194d9bb6c006062624e7ca6424aa1474986df (patch)
tree5eea445e0dffe8582b422a20b76f0c0e7460835b /drivers/staging/unisys
parent3659955a644c1de08bce69587c5b651d8759c5b5 (diff)
staging: unisys: visorbus: add error handling for dev_start_periodic_work
Report errors if we have a problem in dev_start_periodic_work. Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r--drivers/staging/unisys/visorbus/visorbus_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c
index 6f3bbe55f416..c97f32f5c235 100644
--- a/drivers/staging/unisys/visorbus/visorbus_main.c
+++ b/drivers/staging/unisys/visorbus/visorbus_main.c
@@ -464,16 +464,17 @@ dev_periodic_work(unsigned long __opaque)
mod_timer(&dev->timer, jiffies + POLLJIFFIES_NORMALCHANNEL);
}
-static void
+static int
dev_start_periodic_work(struct visor_device *dev)
{
if (dev->being_removed || dev->timer_active)
- return;
+ return -EINVAL;
/* now up by at least 2 */
get_device(&dev->device);
dev->timer.expires = jiffies + POLLJIFFIES_NORMALCHANNEL;
add_timer(&dev->timer);
dev->timer_active = true;
+ return 0;
}
static void