* [PATCH] counter: sysfs: remove double return in counter_sysfs_attr_add()
@ 2026-02-04 18:00 Cosmin Tanislav
2026-03-21 13:47 ` William Breathitt Gray
0 siblings, 1 reply; 2+ messages in thread
From: Cosmin Tanislav @ 2026-02-04 18:00 UTC (permalink / raw)
To: William Breathitt Gray, Greg Kroah-Hartman
Cc: linux-iio, linux-kernel, Cosmin Tanislav
sysfs attribute creation for counter extensions has been consolidated
into a single function, counter_sysfs_exts_add().
Inside counter_sysfs_attr_add(), although the code was changed to return
the result of counter_sysfs_exts_add(), an unreachable return 0;
statement was left at the end of the function.
Remove it.
Fixes: bb4bbbec664f ("counter: Consolidate Counter extension sysfs attribute creation")
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
---
drivers/counter/counter-sysfs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/counter/counter-sysfs.c b/drivers/counter/counter-sysfs.c
index 42c523343d32..ed85da907982 100644
--- a/drivers/counter/counter-sysfs.c
+++ b/drivers/counter/counter-sysfs.c
@@ -1101,8 +1101,6 @@ static int counter_sysfs_attr_add(struct counter_device *const counter,
/* Add device extensions */
return counter_sysfs_exts_add(dev, cattr_group, counter->ext,
counter->num_ext, scope, NULL);
-
- return 0;
}
/**
--
2.52.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] counter: sysfs: remove double return in counter_sysfs_attr_add()
2026-02-04 18:00 [PATCH] counter: sysfs: remove double return in counter_sysfs_attr_add() Cosmin Tanislav
@ 2026-03-21 13:47 ` William Breathitt Gray
0 siblings, 0 replies; 2+ messages in thread
From: William Breathitt Gray @ 2026-03-21 13:47 UTC (permalink / raw)
To: Greg Kroah-Hartman, Cosmin Tanislav
Cc: William Breathitt Gray, linux-iio, linux-kernel
On Wed, 04 Feb 2026 20:00:32 +0200, Cosmin Tanislav wrote:
> sysfs attribute creation for counter extensions has been consolidated
> into a single function, counter_sysfs_exts_add().
>
> Inside counter_sysfs_attr_add(), although the code was changed to return
> the result of counter_sysfs_exts_add(), an unreachable return 0;
> statement was left at the end of the function.
>
> [...]
Applied, thanks!
[1/1] counter: sysfs: remove double return in counter_sysfs_attr_add()
commit: cbf8db23fc58db8d516ebc7aa57c4563f36532b9
Best regards,
--
William Breathitt Gray <wbg@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-21 13:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-04 18:00 [PATCH] counter: sysfs: remove double return in counter_sysfs_attr_add() Cosmin Tanislav
2026-03-21 13:47 ` William Breathitt Gray
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®