[PATCH 1/2] drm/imx/dcss: Drop if blocks with always false condition
Laurentiu Palcu
laurentiu.palcu at oss.nxp.com
Tue Jan 10 14:42:20 UTC 2023
Hi,
On Fri, Dec 30, 2022 at 02:00:24PM +0100, Uwe Kleine-König wrote:
> 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 <u.kleine-koenig at pengutronix.de>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu at oss.nxp.com>
Pushed to drm-misc-next.
Thanks,
laurentiu
> ---
> 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);
>
> --
> 2.38.1
>
More information about the dri-devel
mailing list