[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20260204180032.514328-1-cosmin-gabriel.tanislav.xa@renesas.com>
Date: Wed, 4 Feb 2026 20:00:32 +0200
From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@...esas.com>
To: William Breathitt Gray <wbg@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Cosmin Tanislav <cosmin-gabriel.tanislav.xa@...esas.com>
Subject: [PATCH] counter: sysfs: remove double return in counter_sysfs_attr_add()
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@...esas.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
Powered by blists - more mailing lists