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 <liaoyuanhong@vivo.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://lore.kernel.org/r/20250815133643.418089-1-liaoyuanhong@vivo.com
This commit is contained in:
committed by
Lyude Paul
parent
24de3daf61
commit
f3e8293685
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user