[PATCH] cmd: Fix an error code in cmd_mux_find()
Dan Carpenter
dan.carpenter at linaro.org
Tue Jul 25 08:50:08 CEST 2023
This returns the wrong variable. It ends up returning NULL when it was
suppose to return an error pointer.
Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>
---
cmd/mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/mux.c b/cmd/mux.c
index 833266f08b1e..c75907af7726 100644
--- a/cmd/mux.c
+++ b/cmd/mux.c
@@ -49,7 +49,7 @@ static struct mux_control *cmd_mux_find(char *const argv[])
chip = dev_get_uclass_priv(dev);
if (!chip)
- return ERR_PTR(ret);
+ return ERR_PTR(-EINVAL);
if (id >= chip->controllers)
return ERR_PTR(-EINVAL);
--
2.39.2
More information about the U-Boot
mailing list