summaryrefslogtreecommitdiff
path: root/drivers/media/usb/gspca/nw80x.c
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2020-05-20 08:43:03 -0300
committerGitHub <noreply@github.com>2020-05-20 08:43:03 -0300
commit1279cd128bba968ebe0a2df7f7ae38bae90250ef (patch)
treedf6b1a190760f51465122ca4c13492d5ac5984c6 /drivers/media/usb/gspca/nw80x.c
parent0a8ab17689e628c84a666195bfc6ab85d11cf057 (diff)
parent2ae782ca839e0ee07de37122ddea362adff2e975 (diff)
Merge pull request #76 from toradex/4.9-2.3.x-imx
4.9 2.3.x imx
Diffstat (limited to 'drivers/media/usb/gspca/nw80x.c')
-rw-r--r--drivers/media/usb/gspca/nw80x.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/usb/gspca/nw80x.c b/drivers/media/usb/gspca/nw80x.c
index 599f755e75b8..7ebeee98dc1b 100644
--- a/drivers/media/usb/gspca/nw80x.c
+++ b/drivers/media/usb/gspca/nw80x.c
@@ -1584,6 +1584,11 @@ static void reg_r(struct gspca_dev *gspca_dev,
if (ret < 0) {
pr_err("reg_r err %d\n", ret);
gspca_dev->usb_err = ret;
+ /*
+ * Make sure the buffer is zeroed to avoid uninitialized
+ * values.
+ */
+ memset(gspca_dev->usb_buf, 0, USB_BUF_SZ);
return;
}
if (len == 1)