diff options
Diffstat (limited to 'drivers/video/via/via_aux_edid.c')
-rw-r--r-- | drivers/video/via/via_aux_edid.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/via/via_aux_edid.c b/drivers/video/via/via_aux_edid.c index 03f7a41c8a3f..754d4509033f 100644 --- a/drivers/video/via/via_aux_edid.c +++ b/drivers/video/via/via_aux_edid.c @@ -36,10 +36,13 @@ static void query_edid(struct via_aux_drv *drv) unsigned char edid[EDID_LENGTH]; bool valid = false; - if (spec) + if (spec) { fb_destroy_modedb(spec->modedb); - else + } else { spec = kmalloc(sizeof(*spec), GFP_KERNEL); + if (!spec) + return; + } spec->version = spec->revision = 0; if (via_aux_read(drv, 0x00, edid, EDID_LENGTH)) { |