“885bd8eca6ac172e299750d99bd5c9fddbed89b9”上不存在“README.md”
提交 fc48f169 编写于 作者: T Takashi Iwai 提交者: Dave Airlie

drm/edid: add missing NULL checks.

Reviewed-by: NDave Airlie <airlied@redhat.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 b309bd37
无相关合并请求
...@@ -779,6 +779,8 @@ drm_mode_std(struct drm_connector *connector, struct edid *edid, ...@@ -779,6 +779,8 @@ drm_mode_std(struct drm_connector *connector, struct edid *edid,
* secondary GTF curve. Please don't do that. * secondary GTF curve. Please don't do that.
*/ */
mode = drm_gtf_mode(dev, hsize, vsize, vrefresh_rate, 0, 0); mode = drm_gtf_mode(dev, hsize, vsize, vrefresh_rate, 0, 0);
if (!mode)
return NULL;
if (drm_mode_hsync(mode) > drm_gtf2_hbreak(edid)) { if (drm_mode_hsync(mode) > drm_gtf2_hbreak(edid)) {
drm_mode_destroy(dev, mode); drm_mode_destroy(dev, mode);
mode = drm_gtf_mode_complex(dev, hsize, vsize, mode = drm_gtf_mode_complex(dev, hsize, vsize,
...@@ -1048,6 +1050,8 @@ drm_gtf_modes_for_range(struct drm_connector *connector, struct edid *edid, ...@@ -1048,6 +1050,8 @@ drm_gtf_modes_for_range(struct drm_connector *connector, struct edid *edid,
for (i = 0; i < num_extra_modes; i++) { for (i = 0; i < num_extra_modes; i++) {
const struct minimode *m = &extra_modes[i]; const struct minimode *m = &extra_modes[i];
newmode = drm_gtf_mode(dev, m->w, m->h, m->r, 0, 0); newmode = drm_gtf_mode(dev, m->w, m->h, m->r, 0, 0);
if (!newmode)
return modes;
if (!mode_in_range(newmode, edid, timing)) { if (!mode_in_range(newmode, edid, timing)) {
drm_mode_destroy(dev, newmode); drm_mode_destroy(dev, newmode);
...@@ -1073,6 +1077,8 @@ drm_cvt_modes_for_range(struct drm_connector *connector, struct edid *edid, ...@@ -1073,6 +1077,8 @@ drm_cvt_modes_for_range(struct drm_connector *connector, struct edid *edid,
for (i = 0; i < num_extra_modes; i++) { for (i = 0; i < num_extra_modes; i++) {
const struct minimode *m = &extra_modes[i]; const struct minimode *m = &extra_modes[i];
newmode = drm_cvt_mode(dev, m->w, m->h, m->r, rb, 0, 0); newmode = drm_cvt_mode(dev, m->w, m->h, m->r, rb, 0, 0);
if (!newmode)
return modes;
if (!mode_in_range(newmode, edid, timing)) { if (!mode_in_range(newmode, edid, timing)) {
drm_mode_destroy(dev, newmode); drm_mode_destroy(dev, newmode);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部