From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98459CA100C for ; Tue, 5 Sep 2023 16:33:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353986AbjIEQ3R (ORCPT ); Tue, 5 Sep 2023 12:29:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353743AbjIEHu0 (ORCPT ); Tue, 5 Sep 2023 03:50:26 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4476FCE for ; Tue, 5 Sep 2023 00:50:23 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 479B86607033; Tue, 5 Sep 2023 08:50:21 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1693900222; bh=cXx08/+vSTpp6ZDNY6TezW61pOCQM/cfaUeXecccxEk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Xk12O4wDk4dwa824rlDTtt/bK3NANY2/gQ/BRI4Kc6AtQ1h1yLDJo4Erf8XeMpb5M eVvGVczDyCeMtMVDhcGnBYErf8pl4k5I41OZIEH5JiiNRpO3j4t/6L3eEOXYgcnz5D 6QFiOU2J1MIm9LF5+0HhudMggXps7T89C+/3wbnC3cqfI+keT+/rdjp1OjRN+aRjLk szwpnEGmLSeeJu57XRrYmYQyCIcSBI9wBTbDka0y8JEB3u1crs1J6ipOaYJoF2130V 5Lfwz1FAZ+FjE4ddBmPCHRwWdEb7bixwkjwRjVTs+TVEe6yEG+frZP/2NLyCQugOqC 1F9bHbA0cBsWg== Message-ID: <33df386c-cbe4-22e5-5d31-f306659b9cfc@collabora.com> Date: Tue, 5 Sep 2023 09:50:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v3 1/2] drm/mediatek: fix kernel oops if no crtc is found Content-Language: en-US To: Michael Walle , =?UTF-8?Q?N=c3=adcolas_F_=2e_R_=2e_A_=2e_Prado?= , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger Cc: "Nancy . Lin" , Frank Wunderlich , Jitao Shi , Stu Hsieh , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20230901174557.3617839-1-mwalle@kernel.org> From: AngeloGioacchino Del Regno In-Reply-To: <20230901174557.3617839-1-mwalle@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 01/09/23 19:45, Michael Walle ha scritto: > drm_crtc_from_index(0) might return NULL if there are no CRTCs > registered at all which will lead to a kernel oops in > mtk_drm_crtc_dma_dev_get(). Add the missing return value check. > > Fixes: 0d9eee9118b7 ("drm/mediatek: Add drm ovl_adaptor sub driver for MT8195") > Signed-off-by: Michael Walle > Reviewed-by: NĂ­colas F. R. A. Prado > Tested-by: NĂ­colas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno