[PATCH] cmd: Fix an error code in cmd_mux_find()

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@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);

On Tue, Jul 25, 2023 at 09:50:08AM +0300, Dan Carpenter wrote:
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@linaro.org
Applied to u-boot/next, thanks!
participants (2)
-
Dan Carpenter
-
Tom Rini