Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3519763pxf; Mon, 15 Mar 2021 11:21:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjW9JxoUApK6mgG5H6BnKAL2veZKNSZJkdoS2xhU10vE7FT8TQPFa2quJsaDEJ9mW3uftS X-Received: by 2002:a50:f9c8:: with SMTP id a8mr31731204edq.270.1615832517251; Mon, 15 Mar 2021 11:21:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832517; cv=none; d=google.com; s=arc-20160816; b=WmynppSiKDu6IdCO6PP3j5TSmNAEdLFc+puWC2dgpmliEMDqK4FPtCsJuZ29H6ikq6 +Lq5O6c1v4OwKu0JKim/EsMdtLIbBHpaTC3P77zew1JVVkgOtemDnLoP6CfXWf0Gf8rN xbABh6tGH5EGKNsAxk9R7cw1n354GwU3G9zjf2ieTGt8vVNNMr19cf4jvo6c6idVBhfr OBuPUHjpt/ENH/t5X9YQYKmLk/h0vgbP9gSh1v/cOGjOoQ0ZPBADmmAyZlIwB/rjSqh0 awzxS4bfGZ2arq4+VNqYEFHozzDjoAQylMIz0XPhbb40y0mWw09X/oO9U9qPUniyLqUS fFXA== 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=KYuP86NJ78RRRGjBkDdzdDuwwfep2ZdEdDJB0e4f1yGv54JwxDk1D2u1H9ZAyGHE1u ErsY1OI0b3Udmr0mEKKj669FRyfM9zmsBkgp9YJw9pjkVM8tPSrGANVBvGtcetHEkuCO ieqYxL9R0pfeivIggtBnWyK6IwG6vZ2PL5UUk+Wqb076k+LYX9Cq7Rfg+cZ2mwcxrUtO lpjEiXA51Ujr4O1j27xyQTlC9IjqBI2Yjj7QHBK8MQ/qeR2Gwvhdt7sgCqLHVTwVJOfX hxmFvLC+a8votDyuiLoEzgJ3Y81MmbojplRYlKAja0T8LmS1K+5eNWJBBS1HNMlofF3K tO9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jDSuEqZv; 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 k12si11656640ejq.734.2021.03.15.11.21.35; Mon, 15 Mar 2021 11:21:57 -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=jDSuEqZv; 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 S230406AbhCOOUs (ORCPT + 99 others); Mon, 15 Mar 2021 10:20:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:35610 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232504AbhCON7v (ORCPT ); Mon, 15 Mar 2021 09:59:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5844764F40; Mon, 15 Mar 2021 13:59:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816771; bh=crdHReBj3aMqOM/98vwY7tguD+5UrMxdp/QNat72IUk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jDSuEqZvNOfFz6vONfGjdTpbXU/dq7WxmcZtznUJycUEIUbj4GZfmtu6IRRDxcE9G Qs3bsgt7BTz66S1W4/x9FS++oy7OU4swP/1vTLSenzHGZ5LxFqLkEsqLRE0tgBkEN1 X+HjYwlJskaCdllc6q4/g9JcEoWMQEnviuWirD3c= 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.10 105/290] media: v4l: vsp1: Fix bru null pointer access Date: Mon, 15 Mar 2021 14:53:18 +0100 Message-Id: <20210315135545.457899497@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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;