Skip to content

Commit

Permalink
staging: unisys: visorbus: add error handling visorbus_enable_channel…
Browse files Browse the repository at this point in the history
…_interrupt

Add error handling to visorbus_enable_channel_interrupt.

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>
  • Loading branch information
David Kershner authored and Greg Kroah-Hartman committed Mar 29, 2017
1 parent b90194d commit 5dca9b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/unisys/include/visorbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/unisys/visorbus/visorbus_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5dca9b2

Please sign in to comment.