* [PATCH] misc: apds990x: Remove unnecessary return code in apds990x_power_state_show()
@ 2023-03-14 1:27 Nobuhiro Iwamatsu
2023-03-14 6:02 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Nobuhiro Iwamatsu @ 2023-03-14 1:27 UTC (permalink / raw)
To: Arnd Bergmann, Greg Kroah-Hartman, Samu Onkalo
Cc: linux-kernel, Nobuhiro Iwamatsu, stable
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@vger.kernel.org
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] misc: apds990x: Remove unnecessary return code in apds990x_power_state_show()
2023-03-14 1:27 [PATCH] misc: apds990x: Remove unnecessary return code in apds990x_power_state_show() Nobuhiro Iwamatsu
@ 2023-03-14 6:02 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2023-03-14 6:02 UTC (permalink / raw)
To: Nobuhiro Iwamatsu; +Cc: Arnd Bergmann, Samu Onkalo, linux-kernel, stable
On Tue, Mar 14, 2023 at 10:27:32AM +0900, Nobuhiro Iwamatsu wrote:
> 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@vger.kernel.org
Why is this needed for stable kernels? It's dead code removal, no
actual functionality is changed.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-14 6:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14 1:27 [PATCH] misc: apds990x: Remove unnecessary return code in apds990x_power_state_show() Nobuhiro Iwamatsu
2023-03-14 6:02 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).