Merge "disp: msm: sde: add checks when retrieving blob feature data"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

commit
bc3126309a
@@ -1004,6 +1004,12 @@ static struct drm_property_blob *_sde_cp_get_crtc_feature_data(u32 feature,
|
|||||||
memset(hw_cfg, 0, sizeof(*hw_cfg));
|
memset(hw_cfg, 0, sizeof(*hw_cfg));
|
||||||
*feature_enabled = false;
|
*feature_enabled = false;
|
||||||
|
|
||||||
|
if (!property || !prop_node) {
|
||||||
|
DRM_ERROR("invalid feature:%d, property:%pK, prop_node:%pK\n",
|
||||||
|
feature, property, prop_node);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
if (property->flags & DRM_MODE_PROP_BLOB) {
|
if (property->flags & DRM_MODE_PROP_BLOB) {
|
||||||
blob = drm_property_lookup_blob(crtc->base.dev,
|
blob = drm_property_lookup_blob(crtc->base.dev,
|
||||||
pstate->prop_val);
|
pstate->prop_val);
|
||||||
@@ -1036,7 +1042,7 @@ static struct drm_property_blob *_sde_cp_get_crtc_feature_data(u32 feature,
|
|||||||
} else {
|
} else {
|
||||||
DRM_ERROR("property type is not supported\n");
|
DRM_ERROR("property type is not supported\n");
|
||||||
}
|
}
|
||||||
|
end:
|
||||||
return blob;
|
return blob;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user