From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AA03BA48 for ; Tue, 7 Mar 2023 18:24:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0326DC433D2; Tue, 7 Mar 2023 18:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678213488; bh=RONamiWUnS1jsHwEzeFMADHKZ8TSz9JNW65MKys36g0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bD5a9datYhntdPIRZ29XLDDFa8Jau2vDfy0QNfsOVySJTdEuS9qJBr3yrzydnJp2S o4xx+lWK507egVIAj9iedb2BTSFaVNLFdefORjPaLB1pOpgqb+LXy8ZGM3uqBKoJib 3vP3MXHYT6Lb+5QTDqnvx2Pw8wbkX7VD67gbEsoM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 6.1 522/885] media: i2c: ov7670: 0 instead of -EINVAL was returned Date: Tue, 7 Mar 2023 17:57:36 +0100 Message-Id: <20230307170025.141158265@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307170001.594919529@linuxfoundation.org> References: <20230307170001.594919529@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Hans Verkuil [ Upstream commit 6a4c664539e6de9b32b65ddcf767ec1bcc1d7f8a ] If the media bus is unsupported, then return -EINVAL. Instead it returned 'ret' which happened to be 0. This fixes a smatch warning: ov7670.c:1843 ov7670_parse_dt() warn: missing error code? 'ret' Signed-off-by: Hans Verkuil Fixes: 01b8444828fc ("media: v4l2: i2c: ov7670: Implement OF mbus configuration") Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/i2c/ov7670.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index 4b9b156b53c7a..c06364c1cbd1b 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c @@ -1841,7 +1841,7 @@ static int ov7670_parse_dt(struct device *dev, if (bus_cfg.bus_type != V4L2_MBUS_PARALLEL) { dev_err(dev, "Unsupported media bus type\n"); - return ret; + return -EINVAL; } info->mbus_config = bus_cfg.bus.parallel.flags; -- 2.39.2