From patchwork Mon Jul 12 06:06:00 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: 472949 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp2674277jao; Mon, 12 Jul 2021 00:11:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0IzJS1ZwtvSmd3UZz1S2D/TmitlHc84Qy08dUngylPxJkZohmGnCzRT3HJTaBRrme2noD X-Received: by 2002:a05:6638:264e:: with SMTP id n14mr7456051jat.71.1626073871904; Mon, 12 Jul 2021 00:11:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626073871; cv=none; d=google.com; s=arc-20160816; b=MbSF6Ua1njj4Nz/8I2OSGeRDYAk8Ys14Tn09y3MmAENHsG4foLdy8mhc3zRYfDoraq XitiaUITPkg8SI8W0u4g/cohKW2e3QjQdCbyh0Lu9PD2v50ah8R/Hf5gF1dxbq54aXxU IDKleCQdQxm51ndSV/rWTim2X7NTF1K+CY2BxX/szfmC5BBmNgHKtGwXB4UJ9BBTX/v3 WXCin80aqoQ8IsDw8JPJZDmCHFFEe+eh+W01ZRyk/U16/qhufL7Y6Gb19kSRexthI4wy llI61q2wCB6wydZbWDJIKd77urHvGnZpBmo/iWkxI+ShvBYkbRZyJ4TmcFYE+pgSEJwG TatA== 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=U0CA7eONEaKIUEqvMK4JPeridNcp6BNIfI9EAozvor4=; b=Gnmz7ZO/K6MJQORKyPqQ8kNcB1BJD1NUj7m2JmbZIwjkrRDG7zTT/WldcNE57TbW/A SCqkQ2OLOblWvmFmNblTR5ho9twAAJZDvxl1TEPe4vKKX8PbXPyOUmOay5paGka6EYDV ueOFo548HB6kczN+uaX4TuZCBXaokZy2x3ZyfnBWEAJdxRci7mnGsMTYwEzow+xo62lo CnqXe7EpvdqTYuqN+unxd0x34TvhrlTO8hCLQXiwLOvjHKoRta56gqhux/IKqpO9tYae Bi/9TWQRysj7CnHWnjfAPLOE84g1ylWJvX8M7zXH3PFkUVpOcF10bXaynTwyhq8Vv0aF 9+Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JOhSDB8P; 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 g12si16580694jas.65.2021.07.12.00.11.11; Mon, 12 Jul 2021 00:11:11 -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=JOhSDB8P; 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 S239580AbhGLHMh (ORCPT + 12 others); Mon, 12 Jul 2021 03:12:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:42016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244024AbhGLHKT (ORCPT ); Mon, 12 Jul 2021 03:10:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 094B66136D; Mon, 12 Jul 2021 07:05:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626073541; bh=K0RB13v0alRNHwX75C8a5XcddkCCjo9XD092qfbXoss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JOhSDB8PGwRr9R3GBS4zDLCb6nzWpUwnRu1X4J0ksLdR5AKxV3i3Gick675tODIVU xKzkhDQKqPpKUYNVR34RUhORTdGM7jx7ZdU4JxqioozUPFFFLBiAMDp294L0K3KGKt 8f26QZmc3VNoxJsPT6GTzGzBbi61whPzDGCEDPFw= 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.12 277/700] media: tc358743: Fix error return code in tc358743_probe_of() Date: Mon, 12 Jul 2021 08:06:00 +0200 Message-Id: <20210712061005.723675350@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712060924.797321836@linuxfoundation.org> References: <20210712060924.797321836@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 1b309bb743c7..f21da11caf22 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -1974,6 +1974,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; }