Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9116359pxu; Mon, 28 Dec 2020 07:03:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0J1nL5pu33nnjvbl5GpwKvfKXaNqbzUJ+1mqdabpYKC+EogN8U/bclFx8oydy9thP8xxh X-Received: by 2002:a50:fe0e:: with SMTP id f14mr43265525edt.159.1609167830148; Mon, 28 Dec 2020 07:03:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609167830; cv=none; d=google.com; s=arc-20160816; b=x6cLHf9evF6K7XNXG0XKJjLkHDw8l+bVxfOOZo57vTGqJhbVht4GUq/096M/5Q/h/d bspAo+tg/35fKcqqWcRj+qo3XtHHD3SJWJPqjC41J8CUnLPpJaYo7wwQKB+b0BnsnNE1 lq3DLTWEbxdoxsqas7wC/Z9BPAmf431uts4f1aVAjAM6KnSTKqa1g/qvdyOpvw8gaIOe 8cOdjKL6E+0D5FUL0YfmStuxTkLr8XNVHY1ZBp5CWJcGQT+jVIhHz8VJ3tBIyIEIFWX9 SYNxBPTkeZd6jXXart1QvvX2gSlTjYmPW3hE3QaUpoXKVHi29CNC3wIOIC/DROFl2skD W+pA== 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=op4rHlVu+GL4dGCaTMhEh9nI4pc1Jv+9wTWWeieA+LY=; b=0IQmBJtwACYPBi1wOYLmum7tZ2gbVaSjZrJA6jXHpBILNy8qDxe4Bi3r7joGgW90K+ Fdi/TT249Kq8P70zFL55UwE9FC/rD/hBMzwVnpRQbydRbsJ/8ZjSOkCN6f+ghH1taqqq mhXTT6X9mza/clVuh2pl1EpJAv3jgsgnjbVsM3+r8xN88NJzKBAM6bKc0lZL6YuqhaGD iSzNQUzk8aAVfQpjRuGND4EnzkpexRsN0SScTnW+1xyTLG3cz2G2Zv+PETAPnzxuDFSS m+PZ4jMF0SSsq4NA1BTJ9Rz4koeFJ8gpEoIHXcLoDNgEaNucdbZ5I0rZAQDQMrUm/aNS rDhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Tyvt21mg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 o23si19311917edt.543.2020.12.28.07.03.27; Mon, 28 Dec 2020 07:03:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=Tyvt21mg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S2392861AbgL1PBc (ORCPT + 99 others); Mon, 28 Dec 2020 10:01:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:48566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440221AbgL1ONh (ORCPT ); Mon, 28 Dec 2020 09:13:37 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9BF2920791; Mon, 28 Dec 2020 14:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164777; bh=2j4BhcXHV6IIMii6oXSicMpmDyOckZyxCkkJqERhhq4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tyvt21mgNSOdEk4AKew1REjXXjWbcfzProv8tVG7oXw177kEMhtBowglX3POuXtCt E3Zwpv7VIx+rwZbNYKhLWRlj6tMkX0zq6j+aQgppP/jauTn2m8D4Ne7wd+xYkyBh8r YLNzZEhmnS80MUWAIwgPs5viy1N4pSor4O1XjVrE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhang Xiaoxu , Marco Felsch , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.10 277/717] media: tvp5150: Fix wrong return value of tvp5150_parse_dt() Date: Mon, 28 Dec 2020 13:44:35 +0100 Message-Id: <20201228125034.289135128@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhang Xiaoxu [ Upstream commit eb08c48132a1f594478ab9fa2b6ee646c3513a49 ] If of_graph_get_endpoint_by_regs() return NULL, it will return 0 rather than an errno, because we doesn't initialize the return value. Fixes: 0556f1d580d4 ("media: tvp5150: add input source selection of_graph support") Reported-by: Hulk Robot Signed-off-by: Zhang Xiaoxu Reviewed-by: Marco Felsch Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/i2c/tvp5150.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index 7d9401219a3ac..3b3221fd3fe8f 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c @@ -2082,6 +2082,7 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np) ep_np = of_graph_get_endpoint_by_regs(np, TVP5150_PAD_VID_OUT, 0); if (!ep_np) { + ret = -EINVAL; dev_err(dev, "Error no output endpoint available\n"); goto err_free; } -- 2.27.0