From patchwork Mon Jul 19 14:50:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 479865 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4215239jao; Mon, 19 Jul 2021 08:09:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjCnGd7CkvjBlbSWSoTZHCPz8QLHKnu8Q1XVXDzdgpWiTugIMgBnleQyr/p3x4zjP8ihAo X-Received: by 2002:a17:906:3a19:: with SMTP id z25mr27510399eje.536.1626707371925; Mon, 19 Jul 2021 08:09:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626707371; cv=none; d=google.com; s=arc-20160816; b=kbneFP+O6kDjl9D2Po0T0T/xrw6XsIUVvkCCKiLnZ7mqjLcwP8jq0xVgpSLsEPY+Ra OifdsdUKn6xzIOmz5TsQ1TxguOsruos6/2SkrLqma/j6Nsjh1m4t0tQblzIh0zXjrA0+ eaetxkrIR7MtFW4RRey9I8JSLyYnZcjT4ZH1T+rbyQhlLEJPFyR5EAzIBYvRAHMkANjf muo3NaRPdGp4A1yEJY7RM4twW+WLEHgnCMsbKX0z8RUxmuWuc/xeCg6SEzZu2B3CiOCY zTchhsvfGsnKjfGa4dEca5eAcEqjzSEUUkB/SgTeVTLdE28JOaI0IeKBfWSKdy3m3unD bbxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7U5x9BoFw3KPMYUTMsYbNo2s/VEnb8B8z9TJwM8qr84=; b=UoNsd2xNDLwdJqNPJMyDNiFDy7CPjbhsKidkeDeQ+r40ISNAyYuU1jwsD9Yn9OB7JI nyfUS4AoyWuuP6REDePVVzxxT9iOxLUQj6uO71B+DQMbUuDSaRvq4MfB1ehAxffq6Sr9 ZEinz+KJzMBIsrP33MHmrDnbEbPi3xZQTuFl71Czr0PBoVYD08DNFqNg7dlHpL0JB6yn 1YpdNstNzNU/3puTIDlWn+YhMti/iFMeYi2QbQTjdP+9c7xuMOdR49iYi6LU/pRG5x9x Ll41My5wKLCUsvXhepN4frE57cAB79Zbz6ekj2rzun+tWLsltqnD6YKYc7z+uEMn4el5 /b4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wEgkJ6FV; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n21si21483108eda.13.2021.07.19.08.09.31; Mon, 19 Jul 2021 08:09:31 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wEgkJ6FV; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241461AbhGSO2u (ORCPT + 12 others); Mon, 19 Jul 2021 10:28:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:39078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243567AbhGSO1L (ORCPT ); Mon, 19 Jul 2021 10:27:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 86D7E6113E; Mon, 19 Jul 2021 15:07:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626707241; bh=/+zANuZD7GSycPJuIsy/hZVkRkb/BLayizqF8RYNenQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wEgkJ6FVi0BFv2G/clAMyTvXgHPVnsIZ/7MmC+FJvmGlCS6yLuIclWXAQURMjSKC9 o74gREt57ypCLR3Nt7+u9K+okZZtdGoQoBE0lk0zJQ8y1Eq52r+Bb4nA9jAL1lzgn0 JKl4S1RCwOoDHcWDCA2KG3DIhbL8/xnohbVkJ9KE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.9 065/245] media: tc358743: Fix error return code in tc358743_probe_of() Date: Mon, 19 Jul 2021 16:50:07 +0200 Message-Id: <20210719144942.507369080@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144940.288257948@linuxfoundation.org> References: <20210719144940.288257948@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhen Lei [ Upstream commit a6b1e7093f0a099571fc8836ab4a589633f956a8 ] When the CSI bps per lane is not in the valid range, an appropriate error code -EINVAL should be returned. However, we currently do not explicitly assign this error code to 'ret'. As a result, 0 was incorrectly returned. Fixes: 256148246852 ("[media] tc358743: support probe from device tree") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/i2c/tc358743.c | 1 + 1 file changed, 1 insertion(+) -- 2.30.2 diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index 3e47b432d0f4..c799071be66f 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -1763,6 +1763,7 @@ static int tc358743_probe_of(struct tc358743_state *state) bps_pr_lane = 2 * endpoint->link_frequencies[0]; if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) { dev_err(dev, "unsupported bps per lane: %u bps\n", bps_pr_lane); + ret = -EINVAL; goto disable_clk; }