Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3515181pxf; Mon, 15 Mar 2021 11:15:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCyk1TQ9B5hdOjhDjtB4Rw7dZOsy8/sL1EGSdU55Z5uwu+8S6StffcnV8b9ytp1DtG8FIf X-Received: by 2002:a17:906:1453:: with SMTP id q19mr25475109ejc.76.1615832101019; Mon, 15 Mar 2021 11:15:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832101; cv=none; d=google.com; s=arc-20160816; b=cBDR/hIEQnrfaGO4d24HFcf02rvY4etOJm2uI23HM+81G81p505Is+erg18f8M4o3T RpR7h8gjB6Kc7PH2b/Y+Kmj+kHTFHwZOivQ9p9Ae+QwuPaqYNlsocHCgdjcHhUdwHzmD J1BeQBeyLZ8odWgiJ4y2O35KyL45WlqYWplDFizAE96qGWSgk1J9AYyCON0hBqjsLDuU lruufZT9Qz1ALMoQYggztZ30Tn2rxW8XPLRXh/dHrOCp7FoulfKLeYuA/3/6av7ewuI2 9kqKcrHHAlPWWn9S19+uNASThRJpc9ffbuCgCVCNdi6PO0/XRPlGSqEDOBmrdaom3wd/ 6CQQ== 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=AZozpD8d5BCk0jynwUywSPRlHKLitGDf2J6HHLMe0q8=; b=Ep1MRZwki4xLJn0WbVeQYwROLIvSrvMzM7jeFB6PxNDX0IJGbD++1Z65q3dToYpm2m URBtyjs+gzDXlgkzAuFwGUrWErnhnA0LXFuGHU+zKlpLnBTCLIpz5XLYz55nTwWry2BH 1ruJkWYm3Y+W30oujgKjIsscrGO8iUKuMhUFP/iHr4d0sdDYwZMh/MiAiFpqmR9KzoOS jLNNEuWrytFnTMGYUy7MksPH6uBgKEIdkWWcF/rKOB+jntT/WROUHE1zofZre2WfcTCE XXfihJbhyCPW4KjoZboHU6Q6IXLxokD85kUoTc+oPMLkLyIarWTyVtARgy/5NzdcwPGk I6wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BbTItGuU; 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 r11si11016597eja.563.2021.03.15.11.14.38; Mon, 15 Mar 2021 11:15:01 -0700 (PDT) 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=BbTItGuU; 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 S236207AbhCOOMg (ORCPT + 99 others); Mon, 15 Mar 2021 10:12:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:37632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231700AbhCON6g (ORCPT ); Mon, 15 Mar 2021 09:58:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4831164F07; Mon, 15 Mar 2021 13:58:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816703; bh=crdHReBj3aMqOM/98vwY7tguD+5UrMxdp/QNat72IUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BbTItGuUsikGXVOUClOmqql/ck6PQnnnXU4cDePIsRKOPQR+F4do4bd0KSJVJkCoJ tPCxjk4KNUs8M1ZEeNnBiF6uMzQUxZqz3vTvA+lrFscRQbxUOpL4hVAEyyfLovE4iI Gcvv5TEH3kz397wK+uMTe8AraGRnQQd2nuRRU0f8= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Biju Das , Hans Verkuil , Mauro Carvalho Chehab Subject: [PATCH 5.4 057/168] media: v4l: vsp1: Fix bru null pointer access Date: Mon, 15 Mar 2021 14:54:49 +0100 Message-Id: <20210315135552.230540805@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@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: Greg Kroah-Hartman From: Biju Das commit ac8d82f586c8692b501cb974604a71ef0e22a04c upstream. RZ/G2L SoC has only BRS. This patch fixes null pointer access,when only BRS is enabled. Fixes: cbb7fa49c7466("media: v4l: vsp1: Rename BRU to BRx") Signed-off-by: Biju Das Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/platform/vsp1/vsp1_drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/platform/vsp1/vsp1_drm.c +++ b/drivers/media/platform/vsp1/vsp1_drm.c @@ -245,7 +245,7 @@ static int vsp1_du_pipeline_setup_brx(st brx = &vsp1->bru->entity; else if (pipe->brx && !drm_pipe->force_brx_release) brx = pipe->brx; - else if (!vsp1->bru->entity.pipe) + else if (vsp1_feature(vsp1, VSP1_HAS_BRU) && !vsp1->bru->entity.pipe) brx = &vsp1->bru->entity; else brx = &vsp1->brs->entity;