Re: [PATCH 2/3] commands: of_diff: simplify error handling

2023-06-13 Thread Johannes Zink
FTR - though I'm too late to the party: This also fixes a null pointer exception when running of_diff with invalid arguments: https://lore.barebox.org/barebox/044fee32-5560-2e85-a0d3-cc7cea71e...@pengutronix.de/ Tested-by: Johannes Zink On 6/8/23 15:40, Ahmad Fatoum wrote: The error check

[PATCH 2/3] commands: of_diff: simplify error handling

2023-06-08 Thread Ahmad Fatoum
The error check and message is duplicated for each argument and could be unified if we move it to get_tree instead. While at it, we limit argc to exactly 3 in case we want to add options in the future. Signed-off-by: Ahmad Fatoum --- commands/of_diff.c | 55 -