diff options
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 477a20817d08..948dfb9f3e9b 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c | |||
@@ -2241,12 +2241,18 @@ static int omapfb_find_best_mode(struct omap_dss_device *display, | |||
2241 | 2241 | ||
2242 | len = 0x80 * 2; | 2242 | len = 0x80 * 2; |
2243 | edid = kmalloc(len, GFP_KERNEL); | 2243 | edid = kmalloc(len, GFP_KERNEL); |
2244 | if (edid == NULL) | ||
2245 | return -ENOMEM; | ||
2244 | 2246 | ||
2245 | r = display->driver->read_edid(display, edid, len); | 2247 | r = display->driver->read_edid(display, edid, len); |
2246 | if (r < 0) | 2248 | if (r < 0) |
2247 | goto err1; | 2249 | goto err1; |
2248 | 2250 | ||
2249 | specs = kzalloc(sizeof(*specs), GFP_KERNEL); | 2251 | specs = kzalloc(sizeof(*specs), GFP_KERNEL); |
2252 | if (specs == NULL) { | ||
2253 | r = -ENOMEM; | ||
2254 | goto err1; | ||
2255 | } | ||
2250 | 2256 | ||
2251 | fb_edid_to_monspecs(edid, specs); | 2257 | fb_edid_to_monspecs(edid, specs); |
2252 | 2258 | ||