From 1ded89e78bca4c43db8e46841c589366202cb2b0 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 25 Jul 2023 09:50:08 +0300 Subject: [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 --- cmd/mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5