mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 22:36:17 +01:00
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:
parent
24de3daf61
commit
f3e8293685
1 changed files with 1 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue