disp: msm: add check for null pointer dereferencing
Add check for null pointers before accessing. Change-Id: I33deb1e931098c246326a01e743a2db760320471 Signed-off-by: Samantha Tran <samtran@codeaurora.org>
此提交包含在:
@@ -502,7 +502,7 @@ static bool sde_crtc_mode_fixup(struct drm_crtc *crtc,
|
||||
struct drm_connector *connector;
|
||||
struct drm_encoder *encoder;
|
||||
struct drm_connector_state *new_conn_state;
|
||||
struct sde_connector_state *c_conn_state;
|
||||
struct sde_connector_state *c_conn_state = NULL;
|
||||
bool encoder_valid = false;
|
||||
int i;
|
||||
|
||||
@@ -526,12 +526,12 @@ static bool sde_crtc_mode_fixup(struct drm_crtc *crtc,
|
||||
|
||||
for_each_new_connector_in_state(c_state->state, connector,
|
||||
new_conn_state, i) {
|
||||
if (new_conn_state->best_encoder == encoder){
|
||||
if (new_conn_state->best_encoder == encoder) {
|
||||
c_conn_state = to_sde_connector_state(new_conn_state);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
c_conn_state = to_sde_connector_state(new_conn_state);
|
||||
if (!c_conn_state) {
|
||||
SDE_ERROR("could not get connector state\n");
|
||||
return true;
|
||||
|
新增問題並參考
封鎖使用者