summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorbus/visorchipset.c
diff options
context:
space:
mode:
authorDavid Kershner2017-03-28 15:34:25 +0200
committerGreg Kroah-Hartman2017-03-29 09:17:02 +0200
commitd9857c794ee858cc6447fcd182da81b5099e5c4d (patch)
treedf41446a1c2348c6adeb68d60a76e44aebcfff99 /drivers/staging/unisys/visorbus/visorchipset.c
parentstaging: unisys: visorbus: add error handling to boottotool_show (diff)
downloadkernel-qcow2-linux-d9857c794ee858cc6447fcd182da81b5099e5c4d.tar.gz
kernel-qcow2-linux-d9857c794ee858cc6447fcd182da81b5099e5c4d.tar.xz
kernel-qcow2-linux-d9857c794ee858cc6447fcd182da81b5099e5c4d.zip
staging: unisys: visorbus: add error handling to error_show
Don't just drop the error from visorchannel_read on the floor, report it. 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/visorbus/visorchipset.c')
-rw-r--r--drivers/staging/unisys/visorbus/visorchipset.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 00fd02f5a71f..b09ef4ce5ae2 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -170,11 +170,14 @@ static ssize_t error_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
u32 error = 0;
+ int err;
- visorchannel_read(chipset_dev->controlvm_channel,
- offsetof(struct spar_controlvm_channel_protocol,
- installation_error),
- &error, sizeof(u32));
+ err = visorchannel_read(chipset_dev->controlvm_channel,
+ offsetof(struct spar_controlvm_channel_protocol,
+ installation_error),
+ &error, sizeof(u32));
+ if (err)
+ return err;
return sprintf(buf, "%i\n", error);
}