From: Erik Arfvidson Date: Sat, 11 Jun 2016 01:48:00 +0000 (-0400) Subject: staging: unisys: visorbus: check parahotplug_request_complete_result X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=80224f064ead5e73d1cf7aacd20a61b5999dfdd6;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git staging: unisys: visorbus: check parahotplug_request_complete_result This patch modifies the caller of parahotplug_request_complete() to check the return value and return appropriate result. Signed-off-by: Erik Arfvidson Signed-off-by: David Kershner Reviewed-by: Tim Sell Acked-By: Neil Horman Reviewed-by: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index d248c946a13b..7f44913bad75 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -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; }