diff mbox series

examples: reconfigure_input_to_output: Remove useless variable

Message ID 20250329031923.564215-1-rostyslav@exmakhina.com
State New
Headers show
Series examples: reconfigure_input_to_output: Remove useless variable | expand

Commit Message

Rostyslav Lobov March 29, 2025, 3:18 a.m. UTC
The `req_cfg` is declared to NULL, never used and then freed.

Signed-off-by: Rostyslav Lobov <rostyslav@exmakhina.com>
---
 examples/reconfigure_input_to_output.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/examples/reconfigure_input_to_output.c b/examples/reconfigure_input_to_output.c
index 451bb0e..734a99c 100644
--- a/examples/reconfigure_input_to_output.c
+++ b/examples/reconfigure_input_to_output.c
@@ -71,7 +71,6 @@  static int reconfigure_as_output_line(struct gpiod_line_request *request,
 				      unsigned int offset,
 				      enum gpiod_line_value value)
 {
-	struct gpiod_request_config *req_cfg = NULL;
 	struct gpiod_line_settings *settings;
 	struct gpiod_line_config *line_cfg;
 	int ret = -1;
@@ -95,8 +94,6 @@  static int reconfigure_as_output_line(struct gpiod_line_request *request,
 
 	ret = gpiod_line_request_reconfigure_lines(request, line_cfg);
 
-	gpiod_request_config_free(req_cfg);
-
 free_line_config:
 	gpiod_line_config_free(line_cfg);