[PATCH 01/10] video: ipuv3: Do not crash when no mode is found
Sascha Hauer
s.hauer at pengutronix.de
Wed Sep 23 04:47:22 PDT 2015
When something is missing in the device tree or not all necessary
drivers are compiled in it may happen that no valid mode is found.
Do not crash in this case but print an error message.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/video/imx-ipu-v3/ipufb.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/video/imx-ipu-v3/ipufb.c b/drivers/video/imx-ipu-v3/ipufb.c
index ea2e83b..401f8f7 100644
--- a/drivers/video/imx-ipu-v3/ipufb.c
+++ b/drivers/video/imx-ipu-v3/ipufb.c
@@ -189,6 +189,11 @@ static void ipufb_enable_controller(struct fb_info *info)
{
struct ipufb_info *fbi = container_of(info, struct ipufb_info, info);
+ if (!info->mode) {
+ dev_err(fbi->dev, "No valid mode found\n");
+ return;
+ }
+
vpl_ioctl_prepare(&fbi->vpl, 2 + fbi->dino, info->mode);
ipu_crtc_mode_set(fbi, info->mode, 0, 0);
--
2.5.1
More information about the barebox
mailing list