diff options
| author | Andrew Goodbody <[email protected]> | 2025-07-16 10:58:39 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-07-24 11:49:18 -0600 |
| commit | 70bf6e33e15e2ce56f6e3e9a3f725136c9c6f486 (patch) | |
| tree | ea7b290d72019b226d402aafc83667292abf7509 /cmd | |
| parent | 7bf2a52b4943b5a83785d8fbd66275cb8e93c49d (diff) | |
uclass: Cleanup uclass_find_next_device
uclass_find_next_device always returns 0, so instead make it a void and
update calling sites.
Signed-off-by: Andrew Goodbody <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/regulator.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/regulator.c b/cmd/regulator.c index da298090bb7..8d743c8d269 100644 --- a/cmd/regulator.c +++ b/cmd/regulator.c @@ -96,11 +96,11 @@ static int do_list(struct cmd_tbl *cmdtp, int flag, int argc, LIMIT_OFNAME, LIMIT_OFNAME, "regulator-name", "Parent"); - for (ret = uclass_find_first_device(UCLASS_REGULATOR, &dev); dev; - ret = uclass_find_next_device(&dev)) { - if (ret) - continue; + ret = uclass_find_first_device(UCLASS_REGULATOR, &dev); + if (ret) + return ret; + for (; dev; uclass_find_next_device(&dev)) { uc_pdata = dev_get_uclass_plat(dev); printf("| %-*.*s| %-*.*s| %s\n", LIMIT_DEVNAME, LIMIT_DEVNAME, dev->name, |
