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

This commit is contained in:
Linux Build Service Account 2017-08-30 19:30:05 -07:00 committed by Gerrit - the friendly Code Review server
commit fc9558666f
2 changed files with 4 additions and 2 deletions

View file

@ -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);
}

View file

@ -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