All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Kershner <david.kershner@unisys.com>
To: gregkh@linuxfoundation.org,
	driverdev-devel@linuxdriverproject.org,
	sparmaintainer@unisys.com, jes.sorensen@gmail.com
Cc: David Kershner <david.kershner@unisys.com>
Subject: [PATCH 09/44] staging: unisys: visorbus: add error handling textid_show
Date: Tue, 28 Mar 2017 09:34:26 -0400	[thread overview]
Message-ID: <04df48d96b91c6be2827a576c3431ba1d372922a.1490672385.git-series.david.kershner@unisys.com> (raw)
In-Reply-To: <cover.4d5ce59a45e58d0b4c0bcfd0b173997d587f7a75.1490672385.git-series.david.kershner@unisys.com>

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>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index b09ef4c..cd2f419 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -205,12 +205,16 @@ static ssize_t textid_show(struct device *dev, struct device_attribute *attr,
 			   char *buf)
 {
 	u32 text_id = 0;
+	int err;
+
+	err = visorchannel_read
+			(chipset_dev->controlvm_channel,
+			 offsetof(struct spar_controlvm_channel_protocol,
+				  installation_text_id),
+			 &text_id, sizeof(u32));
+	if (err)
+		return err;
 
-	visorchannel_read
-		(chipset_dev->controlvm_channel,
-		 offsetof(struct spar_controlvm_channel_protocol,
-			  installation_text_id),
-		 &text_id, sizeof(u32));
 	return sprintf(buf, "%i\n", text_id);
 }
 
-- 
git-series 0.9.1

  parent reply	other threads:[~2017-03-28 13:34 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 13:34 [PATCH 00/44] staging: unisys: Add additional error handling to the s-Par drivers David Kershner
2017-03-28 13:34 ` [PATCH 01/44] staging: unisys: visorbus: parahotplug_process_message add error handling David Kershner
2017-03-28 13:34 ` [PATCH 02/44] staging: unisys: visorbus: add error handling to handle_command David Kershner
2017-03-28 13:34 ` [PATCH 03/44] staging: unisys: visorbus: add error handling to controlvm_periodic_work David Kershner
2017-03-28 13:34 ` [PATCH 04/44] staging: unisys: visorbus: add error handling for parahotplug_request_kickoff David Kershner
2017-03-28 13:34 ` [PATCH 05/44] staging: unisys: visorbus: add error handling around kobject_uevent David Kershner
2017-03-28 13:34 ` [PATCH 06/44] staging: unisys: visorbus: add error handling to toolaction_show David Kershner
2017-03-28 13:34 ` [PATCH 07/44] staging: unisys: visorbus: add error handling to boottotool_show David Kershner
2017-03-28 13:34 ` [PATCH 08/44] staging: unisys: visorbus: add error handling to error_show David Kershner
2017-03-28 13:34 ` David Kershner [this message]
2017-03-28 13:34 ` [PATCH 10/44] staging: unisys: visorbus: add error handling to remaining_steps_show David Kershner
2017-03-28 13:34 ` [PATCH 11/44] staging: unisys: visorbus: move bus_device_info_init to visorbus_main.c David Kershner
2017-03-28 13:34 ` [PATCH 12/44] staging: unisys: visorbus: remove invalid comment, we are one driver David Kershner
2017-03-28 13:34 ` [PATCH 13/44] staging: unisys: visorbus: convert ret to err to be consistent David Kershner
2017-03-28 13:34 ` [PATCH 14/44] staging: unisys: visorbus: boottotool convert ret to err David Kershner
2017-03-28 13:34 ` [PATCH 15/44] staging: unisys: visorbus: error_store " David Kershner
2017-03-28 13:34 ` [PATCH 16/44] staging: unisys: visorbus: textid_store " David Kershner
2017-03-28 13:34 ` [PATCH 17/44] staging: unisys: visorbus: remaining_steps " David Kershner
2017-03-28 13:34 ` [PATCH 18/44] staging: unisys: visorbus: add error handling to chipset_bus_create David Kershner
2017-03-28 13:34 ` [PATCH 19/44] staging: unisys: visorbus: add __packed to structures in controlvmchannel.h David Kershner
2017-03-28 13:34 ` [PATCH 20/44] staging: unisys: visornic: add error handling for visorchannel_signalinsert/remove David Kershner
2017-03-28 13:34 ` [PATCH 21/44] staging: unisys: visorbus: add error handling for chipset_device_create David Kershner
2017-03-28 13:34 ` [PATCH 22/44] staging: unisys: visorbus: consolidate bus_responder and device_responder David Kershner
2017-03-28 13:34 ` [PATCH 23/44] staging: unisys: visorbus: move vbuschannel_print_devinfo from .h to .c file David Kershner
2017-03-28 13:34 ` [PATCH 24/44] staging: unisys: visorbus: get rid of shouting SPAR_VBUS_CHANNEL_CLIENT_OK macro David Kershner
2017-03-28 13:34 ` [PATCH 25/44] staging: unisys: remove client from spar_check_channel David Kershner
2017-03-28 13:34 ` [PATCH 26/44] staging: unisys: visorbus: add error handling for dev_start_periodic_work David Kershner
2017-03-28 13:34 ` [PATCH 27/44] staging: unisys: visorbus: add error handling visorbus_enable_channel_interrupt David Kershner
2017-03-28 13:34 ` [PATCH 28/44] staging: unisys: visorbus: fix error handling in create_bus_instance David Kershner
2017-03-28 13:34 ` [PATCH 29/44] staging: unisys: visorbus: get rid of create_bus_type David Kershner
2017-04-05  6:50   ` [lkp-robot] [staging] 0789e2c538: kernel_BUG_at_drivers/base/driver.c kernel test robot
2017-04-05  6:50     ` kernel test robot
2017-03-28 13:34 ` [PATCH 30/44] staging: unisys: visorbus: get rid of unused parameter forcematch David Kershner
2017-03-28 13:34 ` [PATCH 31/44] staging: unisys: visorbus: get rid of unused parameter forcenomatch David Kershner
2017-03-28 13:34 ` [PATCH 32/44] staging: unisys: visorbus: cleanup error handling in visorbus_uevent David Kershner
2017-03-28 13:34 ` [PATCH 33/44] staging: unisys: visorbus: check for err from dev_set_name David Kershner
2017-03-28 13:34 ` [PATCH 34/44] staging: unisys: visorbus: don't ignore visorchannel_read error David Kershner
2017-03-28 13:34 ` [PATCH 35/44] staging: unisys: visorbus: don't unregister if we failed to register David Kershner
2017-03-28 13:34 ` [PATCH 36/44] staging: unisys: visorbus: add error handling to initiate_chipset_device_pause_resume David Kershner
2017-03-28 13:34 ` [PATCH 37/44] staging: unisys: visorbus: add error handling to chipset_device_pause/resume David Kershner
2017-03-28 13:34 ` [PATCH 38/44] staging: unisys: visorbus: get rid of braces around single statements David Kershner
2017-03-28 13:34 ` [PATCH 39/44] staging: unisys: visorbus: consolidate if statements David Kershner
2017-03-28 13:34 ` [PATCH 40/44] staging: unisys: visorbus: remove useless ifdef David Kershner
2017-03-28 13:34 ` [PATCH 41/44] staging: unisys: visorbus: get rid of ISSUE_IO_VMCALL David Kershner
2017-03-28 13:34 ` [PATCH 42/44] staging: unisys: visorbus: Update vmcallinterface comment David Kershner
2017-03-28 13:35 ` [PATCH 43/44] staging: unisys: visorbus: move unisys_vmcall into visorchipset David Kershner
2017-03-28 13:35 ` [PATCH 44/44] staging: unisys: visorbus: Have unisys_vmcall return Linux error instead of VMCALL error David Kershner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04df48d96b91c6be2827a576c3431ba1d372922a.1490672385.git-series.david.kershner@unisys.com \
    --to=david.kershner@unisys.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jes.sorensen@gmail.com \
    --cc=sparmaintainer@unisys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.