summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib-sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drivers/gpio/gpiolib-sysfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index ef34b8f56bd1..ad7173df72eb 100644
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio/gpiolib-sysfs.c
@@ -110,7 +110,9 @@ static ssize_t value_show(struct device *dev,
if (status < 0)
goto err;
- status = sprintf(buf, "%d\n", status);
+ buf[0] = '0' + status;
+ buf[1] = '\n';
+ status = 2;
err:
mutex_unlock(&data->mutex);