Skip to contentSkip to conversation

soc_camera: Fix debug output of supported formats count

PATCH New Stefan Herbrechtsmeier 1 participant 1 message Jun 15, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 soc_camera: Fix debug output of supported formats count

The supported formats count must be set to 0 after debug output right before the second pass.

linux/drivers/media/video/soc_camera.c +1 -1
@@ -238,11 +238,11 @@ static int soc_camera_init_user_formats(
 		return -ENOMEM;
 
 	icd->num_user_formats = fmts;
-	fmts = 0;
 
 	dev_dbg(&icd->dev, "Found %d supported formats.\n", fmts);
 
 	/* Second pass - actually fill data formats */
+	fmts = 0;
 	for (i = 0; i < icd->num_formats; i++)
 		if (!ici->ops->get_formats) {
 			icd->user_formats[i].host_fmt = icd->formats + i;