Commit 7b9fbc3e authored by Jean Delvare's avatar Jean Delvare Committed by Mauro Carvalho Chehab

V4L/DVB (6147): Pwc: Fix a broken debug message

Commit 85237f20 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: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent f5e4feea
...@@ -1243,7 +1243,7 @@ static int pwc_video_close(struct inode *inode, struct file *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); PWC_ERROR("Failed to power down camera (%d)\n", i);
} }
pdev->vopen--; pdev->vopen--;
PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", i); PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", pdev->vopen);
} else { } else {
pwc_cleanup(pdev); pwc_cleanup(pdev);
/* Free memory (don't set pdev to 0 just yet) */ /* Free memory (don't set pdev to 0 just yet) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment