File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -534,6 +534,7 @@ int meson_plane_create(struct meson_drm *priv)
534
534
struct meson_plane * meson_plane ;
535
535
struct drm_plane * plane ;
536
536
const uint64_t * format_modifiers = format_modifiers_default ;
537
+ int ret ;
537
538
538
539
meson_plane = devm_kzalloc (priv -> drm -> dev , sizeof (* meson_plane ),
539
540
GFP_KERNEL );
@@ -548,12 +549,16 @@ int meson_plane_create(struct meson_drm *priv)
548
549
else if (meson_vpu_is_compatible (priv , VPU_COMPATIBLE_G12A ))
549
550
format_modifiers = format_modifiers_afbc_g12a ;
550
551
551
- drm_universal_plane_init (priv -> drm , plane , 0xFF ,
552
- & meson_plane_funcs ,
553
- supported_drm_formats ,
554
- ARRAY_SIZE (supported_drm_formats ),
555
- format_modifiers ,
556
- DRM_PLANE_TYPE_PRIMARY , "meson_primary_plane" );
552
+ ret = drm_universal_plane_init (priv -> drm , plane , 0xFF ,
553
+ & meson_plane_funcs ,
554
+ supported_drm_formats ,
555
+ ARRAY_SIZE (supported_drm_formats ),
556
+ format_modifiers ,
557
+ DRM_PLANE_TYPE_PRIMARY , "meson_primary_plane" );
558
+ if (ret ) {
559
+ devm_kfree (priv -> drm -> dev , meson_plane );
560
+ return ret ;
561
+ }
557
562
558
563
drm_plane_helper_add (plane , & meson_plane_helper_funcs );
559
564
You can’t perform that action at this time.
0 commit comments