From patchwork Mon Jul 12 06:08:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 472842 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2644193jao; Sun, 11 Jul 2021 23:23:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDNQ4nThC7zdP16Jikbj+39zK1LJrjjXDS6ZfvgpxBiWJ+1L/UQXqd36HxE5zDjvmuvS8S X-Received: by 2002:a05:6402:1a38:: with SMTP id be24mr23058486edb.58.1626070937494; Sun, 11 Jul 2021 23:22:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626070937; cv=none; d=google.com; s=arc-20160816; b=DWC+AUZelOsMSdW6W6WwrUIQJUXRkvWrPRM+QB3+O7oEr6VE1O1uDhDWP/jMN5YyDl DOXkncx2j7D9luNBLd4xnLeD7Fk2ktZJjwaH0+tDTnqgt7jpPR2h7J069w81TgDvCaEb FjwqFnFU5a2vTWNXJ6Dyc+mL3KI2jGL+ZA8TztitbWzq48KXt9DOP0WCPWqeIZYoEleR RXs2xDGsqt6pX3oTGRNIqebkdrsu8n1CRuncw/bqI3wSsAABhClXCyS4YIbaoh6WmTBT 0nghrQhqF+8ACF5uYKFkqPzLPovJz2gMMJBTMoL38WxYq5xSDHQYMZ/GoD8Bvf5EwZC9 vLHA== 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=94mwC4O0Auy95GBQ7tr5kk4FY7ofp4iLlZrVUNYrIdU=; b=SP4HS3sMTVigMp4dk7lc0n/Gx8fEpRn9Kc9bPzlNdQVb3bqEoWqz96dZ86GYwTfJtZ dJ7RqbPre3/GtTlWWgK2vHnQPkzTu7NMxeehQdxfL/58fLzBcy0XoR5owCL70WTHcaT5 GCzCtSbqzc9xmn8UY1QlUOC/pMElWLHotLGIbrlY5OZBvjJd32bm7vR8LTSmVMGMV0WL h0oqxmjeURz0jGl0mi1gVOAE1XonrZfN6wmeVAAdsty6oy8zRZfyDeQdihEJJg9c71Pb 9qJuXsb0TnL6zmn3nj+K4EgRsH+Ms6V4EUQVS1vOHmdmt+6haFyp/MapFXi56cPDpHjq tJnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eJatkjuo; 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 dn7si8190642ejc.635.2021.07.11.23.22.17; Sun, 11 Jul 2021 23:22:17 -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=eJatkjuo; 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 S235410AbhGLGZB (ORCPT + 12 others); Mon, 12 Jul 2021 02:25:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:40462 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234439AbhGLGYH (ORCPT ); Mon, 12 Jul 2021 02:24:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A3FE261158; Mon, 12 Jul 2021 06:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626070827; bh=zLF8kdhC88xF/0xeiYo4eqhyTH8GkUmWJAYOwLEiL8Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eJatkjuoIQNEJliP5RCHT3nV5TtIqWpKqdaSC7i7Taedw28hEfZjbzP8PMXtb+u2T 6itvOuJQaem12sBYLJIeyv/Yg2Kn625vNaUzqrR38rr7/P5FIJ35uywUIsCGTb323G cUjafAuP95B1wo8svzVXCrzfyIScdcnKSXu8hNtY= 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 5.4 155/348] media: tc358743: Fix error return code in tc358743_probe_of() Date: Mon, 12 Jul 2021 08:08:59 +0200 Message-Id: <20210712060721.624829705@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060659.886176320@linuxfoundation.org> References: <20210712060659.886176320@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 114c084c4aec..76c443067ec2 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -1973,6 +1973,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; }