[PATCH] misc: apds990x: Remove unnecessary return code in apds990x_power_state_show()

From: Nobuhiro Iwamatsu
Date: Mon Mar 13 2023 - 21:56:29 EST


In apds990x_power_state_show(), the return value of sprintf is returned, so
'return 0' is unnecessary. This remove 'return 0'.

Fixes: 92b1f84d46b2 ("drivers/misc: driver for APDS990X ALS and proximity sensors")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@xxxxxxxxxxxxx>
---
drivers/misc/apds990x.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c
index 0024503ea6db..6de6dc3c122f 100644
--- a/drivers/misc/apds990x.c
+++ b/drivers/misc/apds990x.c
@@ -984,7 +984,6 @@ static ssize_t apds990x_power_state_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
return sprintf(buf, "%d\n", !pm_runtime_suspended(dev));
- return 0;
}

static ssize_t apds990x_power_state_store(struct device *dev,
--
2.39.2