From: Mark Rustad Date: Thu, 10 Jul 2008 19:27:11 +0000 (-0500) Subject: [PATCH] IPMI: return correct value from ipmi_write X-Git-Tag: MMI-PSA29.97-13-9~33722^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3976df9b04c113ab19dc0268e49c6cec6baf28f7;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [PATCH] IPMI: return correct value from ipmi_write This patch corrects the handling of write operations to the IPMI watchdog to work as intended by returning the number of characters actually processed. Without this patch, an "echo V >/dev/watchdog" enables the watchdog if IPMI is providing the watchdog function. Signed-off-by: Mark Rustad Signed-off-by: Corey Minyard Signed-off-by: Wim Van Sebroeck --- diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 1b9a87047817..0e6df289cb46 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c @@ -755,9 +755,8 @@ static ssize_t ipmi_write(struct file *file, rv = ipmi_heartbeat(); if (rv) return rv; - return 1; } - return 0; + return len; } static ssize_t ipmi_read(struct file *file,