From f3e82936857b3bd77b824ecd2fa7839dd99ec0c6 Mon Sep 17 00:00:00 2001 From: Liao Yuanhong Date: Fri, 15 Aug 2025 21:36:43 +0800 Subject: [PATCH] drm/nouveau: Replace redundant return value judgment with PTR_ERR_OR_ZERO() Replace redundant return value judgment with PTR_ERR_OR_ZERO() to enhance code readability. Signed-off-by: Liao Yuanhong Signed-off-by: Lyude Paul Link: https://lore.kernel.org/r/20250815133643.418089-1-liaoyuanhong@vivo.com --- drivers/gpu/drm/nouveau/nouveau_platform.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_platform.c b/drivers/gpu/drm/nouveau/nouveau_platform.c index a5ce8eb4a3be7..8d5853deeee4d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_platform.c +++ b/drivers/gpu/drm/nouveau/nouveau_platform.c @@ -30,10 +30,7 @@ static int nouveau_platform_probe(struct platform_device *pdev) func = of_device_get_match_data(&pdev->dev); drm = nouveau_platform_device_create(func, pdev, &device); - if (IS_ERR(drm)) - return PTR_ERR(drm); - - return 0; + return PTR_ERR_OR_ZERO(drm); } static void nouveau_platform_remove(struct platform_device *pdev) -- 2.47.3