Skip to contentSkip to conversation

media: pxa_camera: declare variable when DEBUG is defined

PATCH New [email protected] 1 participant 1 message Jan 18, 2021 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: pxa_camera: declare variable when DEBUG is defined

From: Tom Rix <[email protected]>

When DEBUG is defined this error occurs

drivers/media/platform/pxa_camera.c:1410:7: error:
‘i’ undeclared (first use in this function) for (i = 0; i < vb->num_planes; i++)

       ^

The variable 'i' is missing, so declare it.

Fixes 6f28435d1c15 ("[media] media: platform: pxa_camera: trivial move of functions")
---
 drivers/media/platform/pxa_camera.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/media/platform/pxa_camera.c +3 -0
index b664ce7558a1..75fad9689c90 100644
@@ -1386,6 +1386,9 @@ static int pxac_vb2_prepare(struct vb2_buffer *vb)
 	struct pxa_camera_dev *pcdev = vb2_get_drv_priv(vb->vb2_queue);
 	struct pxa_buffer *buf = vb2_to_pxa_buffer(vb);
 	int ret = 0;
+#ifdef DEBUG
+	int i;
+#endif
 
 	switch (pcdev->channels) {
 	case 1:
Signature · 1 line
2.27.0