Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc955866 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/sde: count null character for blob length"

parents b01b3348 1f1075f3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1597,7 +1597,7 @@ static void sde_crtc_install_properties(struct drm_crtc *crtc,
		sde_kms_info_add_keyint(info, "max_mdp_clk",
				sde_kms->perf.max_core_clk_rate);
	msm_property_set_blob(&sde_crtc->property_info, &sde_crtc->blob_info,
			info->data, info->len, CRTC_PROP_INFO);
			info->data, SDE_KMS_INFO_DATALEN(info), CRTC_PROP_INFO);

	kfree(info);
}
+3 −1
Original line number Diff line number Diff line
@@ -282,10 +282,12 @@ struct sde_kms_info {

/**
 * SDE_KMS_INFO_DATALEN - Macro for accessing sde_kms_info data length
 *			it adds an extra character length to count null.
 * @S: Pointer to sde_kms_info structure
 * Returns: Size of available byte data
 */
#define SDE_KMS_INFO_DATALEN(S) ((S) ? ((struct sde_kms_info *)(S))->len : 0)
#define SDE_KMS_INFO_DATALEN(S) ((S) ? ((struct sde_kms_info *)(S))->len + 1 \
							: 0)

/**
 * sde_kms_info_reset - reset sde_kms_info structure