From: David Kershner Date: Tue, 28 Mar 2017 13:34:44 +0000 (-0400) Subject: staging: unisys: visorbus: add error handling visorbus_enable_channel_interrupt X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5dca9b294436eb381b825f60751723e80173cb4b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: unisys: visorbus: add error handling visorbus_enable_channel_interrupt Add error handling to visorbus_enable_channel_interrupt. Signed-off-by: David Kershner Reviewed-by: Reviewed-by: Tim Sell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h index 65829391b3bf..de0635542fbd 100644 --- a/drivers/staging/unisys/include/visorbus.h +++ b/drivers/staging/unisys/include/visorbus.h @@ -180,7 +180,7 @@ int visorbus_read_channel(struct visor_device *dev, int visorbus_write_channel(struct visor_device *dev, unsigned long offset, void *src, unsigned long nbytes); -void visorbus_enable_channel_interrupts(struct visor_device *dev); +int visorbus_enable_channel_interrupts(struct visor_device *dev); void visorbus_disable_channel_interrupts(struct visor_device *dev); /* Levels of severity for diagnostic events, in order from lowest severity to diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index c97f32f5c235..bf0f191e79d3 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -580,17 +580,17 @@ EXPORT_SYMBOL_GPL(visorbus_write_channel); * Currently we don't yet have a real interrupt, so for now we just call the * interrupt function periodically via a timer. */ -void +int visorbus_enable_channel_interrupts(struct visor_device *dev) { struct visor_driver *drv = to_visor_driver(dev->device.driver); if (!drv->channel_interrupt) { dev_err(&dev->device, "%s no interrupt function!\n", __func__); - return; + return -ENOENT; } - dev_start_periodic_work(dev); + return dev_start_periodic_work(dev); } EXPORT_SYMBOL_GPL(visorbus_enable_channel_interrupts);