|
@@ -842,10 +842,8 @@ struct drm_plane *vc4_plane_init(struct drm_device *dev,
|
|
|
|
|
|
vc4_plane = devm_kzalloc(dev->dev, sizeof(*vc4_plane),
|
|
|
GFP_KERNEL);
|
|
|
- if (!vc4_plane) {
|
|
|
- ret = -ENOMEM;
|
|
|
- goto fail;
|
|
|
- }
|
|
|
+ if (!vc4_plane)
|
|
|
+ return ERR_PTR(-ENOMEM);
|
|
|
|
|
|
for (i = 0; i < ARRAY_SIZE(hvs_formats); i++) {
|
|
|
/* Don't allow YUV in cursor planes, since that means
|
|
@@ -866,9 +864,4 @@ struct drm_plane *vc4_plane_init(struct drm_device *dev,
|
|
|
drm_plane_helper_add(plane, &vc4_plane_helper_funcs);
|
|
|
|
|
|
return plane;
|
|
|
-fail:
|
|
|
- if (plane)
|
|
|
- vc4_plane_destroy(plane);
|
|
|
-
|
|
|
- return ERR_PTR(ret);
|
|
|
}
|