]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
counter: sysfs: remove double return in counter_sysfs_attr_add()
authorCosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Wed, 4 Feb 2026 18:00:32 +0000 (20:00 +0200)
committerWilliam Breathitt Gray <wbg@kernel.org>
Sat, 21 Mar 2026 13:41:51 +0000 (22:41 +0900)
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>
Link: https://lore.kernel.org/r/20260204180032.514328-1-cosmin-gabriel.tanislav.xa@renesas.com
Signed-off-by: William Breathitt Gray <wbg@kernel.org>
drivers/counter/counter-sysfs.c

index 42c523343d32870834e29ef5b507eacdae00e302..ed85da907982e7fe81a25af6a07dbd6060bc78cf 100644 (file)
@@ -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;
 }
 
 /**