mirror of https://gitee.com/openkylin/linux.git
V4L/DVB (6147): Pwc: Fix a broken debug message
Commit 85237f202d
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>
This commit is contained in:
parent
f5e4feead7
commit
7b9fbc3e30
|
@ -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) */
|
||||
|
|
Loading…
Reference in New Issue