diff mbox

v4l: mx3_camera: fix NULL pointer dereference if debug output enabled

Message ID 1296478181-10838-1-git-send-email-agust@denx.de (mailing list archive)
State RFC
Headers show

Commit Message

Anatolij Gustschin Jan. 31, 2011, 12:49 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c
index b9cb4a4..7bcaaf7 100644
--- a/drivers/media/video/mx3_camera.c
+++ b/drivers/media/video/mx3_camera.c
@@ -734,9 +734,9 @@  static int mx3_camera_get_formats(struct soc_camera_device *icd, unsigned int id
 	if (xlate) {
 		xlate->host_fmt	= fmt;
 		xlate->code	= code;
-		xlate++;
 		dev_dbg(dev, "Providing format %x in pass-through mode\n",
 			xlate->host_fmt->fourcc);
+		xlate++;
 	}
 
 	return formats;