Skip to content

Commit be01217

Browse files
6by9popcornmix
authored andcommitted
drm/vc4: Ensure zpos is always initialised
The compiler is warning that default_zpos can be used uninitialised as there is no default case to catch all plane types. No other plane types should ever be presented to vc4_fkms_plane_init, but add a default case regardless. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
1 parent 565210a commit be01217

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/gpu/drm/vc4/vc4_firmware_kms.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,7 @@ static struct drm_plane *vc4_fkms_plane_init(struct drm_device *dev,
802802
* other layers as requested by KMS.
803803
*/
804804
switch (type) {
805+
default:
805806
case DRM_PLANE_TYPE_PRIMARY:
806807
default_zpos = 0;
807808
break;

0 commit comments

Comments
 (0)