From patchwork Mon Jul 19 14:50:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 479846 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp4203681jao; Mon, 19 Jul 2021 07:58:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4mSyvUK9B91iw/KhLPdPFgkCxbuNag8WmrEILOTSvfT5jKjqeqld2D7GpQlh1IQZK1JzV X-Received: by 2002:a92:d5cb:: with SMTP id d11mr16843108ilq.133.1626706704943; Mon, 19 Jul 2021 07:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626706704; cv=none; d=google.com; s=arc-20160816; b=G5eOrJ7fxjYE4B57k5yd5VKhl47a5KR/vnoxs0iW16DfvG1bVqdDUnS0leuXiguhbU mYwL4UFOdK5axnPomBIYWvbFgj6aM/qdxbAvFNvnXfidE13yAAJyJkAuX+EhOIP7ltn/ TZ5ji8l4Dbu1M3hMifJSj/VavcUVM05F+GWPocop/L1ZZKAullJxZ7OSA0riKAbFiefw 80gli9cNSrx+uypqLGmBfhFwiZ1H8i3+/c085cBQoRNePaBoqEfEiqvzykKj0X18Ful7 hvZAV84XfB5VcbImwUpX3g3rYUXBuuNVWCQXJTQWfkJpITp/arPU15ttmNuZhptZCtea CDiQ== 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=kOEcfyPyAV1YXfko9AgxcUBaPm8G8qXrtfBG8YFjFj4=; b=BtU2lvY26SS2muW+yCyOCc8PiCgNqZkqpAj6nmjwGfsXPF4KIdkgMYPon+Q085VHYr FxjN8l/BFGi76wJ2l2Wqbshbu/YYCYtqee2yfj5RIRI0gEve4o+wOfXbViXGImicWW1R yG2kV/q9lUqWiXS+pd59o4McoxMN3aLbzGCHIfwviUeNoOha/G/5C81CSKwawR5QHL6M C3EwVuExJ1Zdh0gm7h9Qu2JY8HOIrjKAqE1TkZ+046KSqjZyNyq6newsRl+NdHfgQbO5 WB4PmqNAML1p5MGAGaQdu1474jyBiCqijLs0zkJeKfReutLY+UcGSGv1z9D4VHzhdF5+ Fx1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dtWgE5+J; 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 r23si2768811iot.18.2021.07.19.07.58.24; Mon, 19 Jul 2021 07:58:24 -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=dtWgE5+J; 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 S241280AbhGSORn (ORCPT + 12 others); Mon, 19 Jul 2021 10:17:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:51552 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241945AbhGSOR1 (ORCPT ); Mon, 19 Jul 2021 10:17:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0DAE461002; Mon, 19 Jul 2021 14:58:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626706687; bh=Vbud9SBBYs2/g0xhGe7+szUdm5GkczUREJcQQXajyc8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dtWgE5+Jz5IwnUgXZQWfSEshQtN8KMoCrZ61jipexZZ1/IogSqehsAZbEYY+aUpyB 9iQAq3/Zd0SW8zor08QYIykS3qJwAn/z82/XPl2+W/wVqOyj2mQ6EnDZVEpZjzxopQ RidMf3Nh9gjwaRc7euRjLuJgUxgJHAzNIRA/irns= 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.4 055/188] media: tc358743: Fix error return code in tc358743_probe_of() Date: Mon, 19 Jul 2021 16:50:39 +0200 Message-Id: <20210719144925.896675130@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210719144913.076563739@linuxfoundation.org> References: <20210719144913.076563739@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 1e95fdb61041..c3befb3f5dcd 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -1761,6 +1761,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; }