From patchwork Fri Dec 30 13:00:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13084361 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 292F8C4167B for ; Fri, 30 Dec 2022 13:00:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 535CD10E0A9; Fri, 30 Dec 2022 13:00:39 +0000 (UTC) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1CA3610E0A0 for ; Fri, 30 Dec 2022 13:00:37 +0000 (UTC) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pBEzx-0003hZ-U2; Fri, 30 Dec 2022 14:00:33 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pBEzv-002iAH-Md; Fri, 30 Dec 2022 14:00:31 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pBEzv-008yuH-0u; Fri, 30 Dec 2022 14:00:31 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Laurentiu Palcu , Philipp Zabel Subject: [PATCH 1/2] drm/imx/dcss: Drop if blocks with always false condition Date: Fri, 30 Dec 2022 14:00:24 +0100 Message-Id: <20221230130025.240776-1-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=839; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=k9CZ8SMp5oUYf87AtZCi35cIAxoHgGqu3bV/6kmjLzY=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBjruDiY34a3DtPmhxtH6qxp3/cjY0vStnsnbhk4QYw 7gU0jPuJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCY67g4gAKCRDB/BR4rcrsCQjpB/ 42fNJ2Sd3CBH7MBQpHFWRVIIWai1LsdrQ51N14ZrV0FProSS6gY4SDRHae9+as8NkLNrW/2XliXknq XZ5I3EjOHzxf1aNEGP43NdfPG+ndEdpsIl+DNVyp/7FB8DRQNthL9n/YWh4nnw13jwa2hqx2jE7fdH V5gm6Sj0z0LgspDikh8TvNkjcyNrA4oMyd6lJNz7O30TVM0p3xybgbTsHmrU05NVj5UOIoIi8SCxCx fsqeiElY9JOOg89mAt2/U5W8rEnhxOK0mbeJtSIkCnVu3Z3owzRH9lxu6IqrTtMFpeglKfzYWaQRZ+ +mzvDXLNgeBzcGl4rzS6waX8Z5yfLJ X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, NXP Linux Team , Pengutronix Kernel Team , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" dcss_drv_platform_remove() is only called for a device after dcss_drv_platform_probe() returned 0. In that case dev_set_drvdata() was called with a non-NULL value and so dev_get_drvdata() won't return NULL. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurentiu Palcu --- drivers/gpu/drm/imx/dcss/dcss-drv.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/imx/dcss/dcss-drv.c b/drivers/gpu/drm/imx/dcss/dcss-drv.c index 1c70f70247f6..5c88eecf2ce0 100644 --- a/drivers/gpu/drm/imx/dcss/dcss-drv.c +++ b/drivers/gpu/drm/imx/dcss/dcss-drv.c @@ -85,9 +85,6 @@ static int dcss_drv_platform_remove(struct platform_device *pdev) { struct dcss_drv *mdrv = dev_get_drvdata(&pdev->dev); - if (!mdrv) - return 0; - dcss_kms_detach(mdrv->kms); dcss_dev_destroy(mdrv->dcss);