]> err.no Git - linux-2.6/commitdiff
V4L/DVB (6147): Pwc: Fix a broken debug message
authorJean Delvare <khali@linux-fr.org>
Mon, 3 Sep 2007 14:51:51 +0000 (11:51 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 14 Sep 2007 16:13:41 +0000 (13:13 -0300)
Commit 85237f202d46d55c1bffe0c5b1aa3ddc0f1dce4d introduced the
following warning (with CONFIG_USB_PWC_DEBUG=y):
drivers/media/video/pwc/pwc-if.c: In function "pwc_video_close":
drivers/media/video/pwc/pwc-if.c:1211: warning: "i" may be used uninitialized in this function

This is true, and can cause a broken debug message to be logged.
Here's a fix.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/pwc/pwc-if.c

index 3d81966d8c421eda17a483059dae48bb0f443471..931b274bffcadf82bc5fa85cf7d9041721e961f8 100644 (file)
@@ -1243,7 +1243,7 @@ static int pwc_video_close(struct inode *inode, struct file *file)
                                PWC_ERROR("Failed to power down camera (%d)\n", i);
                }
                pdev->vopen--;
-               PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", i);
+               PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", pdev->vopen);
        } else {
                pwc_cleanup(pdev);
                /* Free memory (don't set pdev to 0 just yet) */