Skip to content

Commit

Permalink
media: lib/test_printf.c: Use helper function to unwind array of soft…
Browse files Browse the repository at this point in the history
…ware_nodes

Use the software_node_unregister_nodes() helper function to unwind this
array in a cleaner way.

Acked-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
  • Loading branch information
Daniel Scally authored and Mauro Carvalho Chehab committed Jan 26, 2021
1 parent 000c08f commit f0328be
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/test_printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,7 @@ static void __init fwnode_pointer(void)
test(second_name, "%pfwP", software_node_fwnode(&softnodes[1]));
test(third_name, "%pfwP", software_node_fwnode(&softnodes[2]));

software_node_unregister(&softnodes[2]);
software_node_unregister(&softnodes[1]);
software_node_unregister(&softnodes[0]);
software_node_unregister_nodes(softnodes);
}

static void __init
Expand Down

0 comments on commit f0328be

Please sign in to comment.