disp: msm: fix kw issues in sde and dp driver
This change addresses out of range and null checks in sde and dp driver. Change-Id: I142196d7394f0bf0abab1bfa89abfd784a5521c8 Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
此提交包含在:
@@ -46,21 +46,21 @@ struct dp_hpd *dp_hpd_get(struct device *dev, struct dp_parser *parser,
|
||||
|
||||
if (parser->no_aux_switch && parser->lphw_hpd) {
|
||||
dp_hpd = dp_lphw_hpd_get(dev, parser, catalog, cb);
|
||||
if (IS_ERR(dp_hpd)) {
|
||||
if (IS_ERR_OR_NULL(dp_hpd)) {
|
||||
DP_ERR("failed to get lphw hpd\n");
|
||||
return dp_hpd;
|
||||
}
|
||||
dp_hpd->type = DP_HPD_LPHW;
|
||||
} else if (parser->no_aux_switch) {
|
||||
dp_hpd = dp_gpio_hpd_get(dev, cb);
|
||||
if (IS_ERR(dp_hpd)) {
|
||||
if (IS_ERR_OR_NULL(dp_hpd)) {
|
||||
DP_ERR("failed to get gpio hpd\n");
|
||||
return dp_hpd;
|
||||
}
|
||||
dp_hpd->type = DP_HPD_GPIO;
|
||||
} else {
|
||||
dp_hpd = dp_altmode_get(dev, cb);
|
||||
if (!IS_ERR(dp_hpd)) {
|
||||
if (!IS_ERR_OR_NULL(dp_hpd)) {
|
||||
dp_hpd->type = DP_HPD_ALTMODE;
|
||||
goto config;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ struct dp_hpd *dp_hpd_get(struct device *dev, struct dp_parser *parser,
|
||||
PTR_ERR(dp_hpd));
|
||||
|
||||
dp_hpd = dp_usbpd_get(dev, cb);
|
||||
if (IS_ERR(dp_hpd)) {
|
||||
if (IS_ERR_OR_NULL(dp_hpd)) {
|
||||
DP_ERR("failed to get usbpd\n");
|
||||
return dp_hpd;
|
||||
}
|
||||
|
新增問題並參考
封鎖使用者