Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1413798 > unrolled thread
| Started by | David Kershner <david.kershner@unisys.com> |
|---|---|
| First post | 2016-06-04 19:30 +0200 |
| Last post | 2016-06-04 19:30 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 02/30] staging: unisys: visorchipset change -1 return value David Kershner <david.kershner@unisys.com> - 2016-06-04 19:30 +0200
| From | David Kershner <david.kershner@unisys.com> |
|---|---|
| Date | 2016-06-04 19:30 +0200 |
| Subject | [PATCH v3 02/30] staging: unisys: visorchipset change -1 return value |
| Message-ID | <rGnyx-3X7-1@gated-at.bofh.it> |
From: Erik Arfvidson <erik.arfvidson@unisys.com>
This patch changes the vague -1 return value to -EINVAL
It also modifies the caller of parahotplug_request_complete
to check the return value and return appropriate result.
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <Timothy.Sell@unisys.com>
---
drivers/staging/unisys/visorbus/visorchipset.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 5ba5936..7f44913 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1613,7 +1613,7 @@ parahotplug_request_complete(int id, u16 active)
}
spin_unlock(¶hotplug_request_list_lock);
- return -1;
+ return -EINVAL;
}
/*
@@ -2036,11 +2036,14 @@ static ssize_t devicedisabled_store(struct device *dev,
const char *buf, size_t count)
{
unsigned int id;
+ int err;
if (kstrtouint(buf, 10, &id))
return -EINVAL;
- parahotplug_request_complete(id, 0);
+ err = parahotplug_request_complete(id, 0);
+ if (err < 0)
+ return err;
return count;
}
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web