From: Dan Carpenter Date: Tue, 25 Jul 2023 06:50:08 +0000 (+0300) Subject: cmd: Fix an error code in cmd_mux_find() X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=1ded89e78bca4c43db8e46841c589366202cb2b0;p=u-boot.git 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 --- diff --git a/cmd/mux.c b/cmd/mux.c index 833266f08b..c75907af77 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);