aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/gspca/sn9c20x.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2019-10-27 11:00:19 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-10-27 11:00:19 -0700
commit728d90bdc9e480dc93913e59a0aa3c896c7aa697 (patch)
tree258b1b6ee711f0ef67fd225700d84eccec285194 /drivers/media/usb/gspca/sn9c20x.c
parentInput: adp5589 - make keypad support optional (diff)
parentLinux 5.4-rc5 (diff)
downloadlinux-dev-728d90bdc9e480dc93913e59a0aa3c896c7aa697.tar.xz
linux-dev-728d90bdc9e480dc93913e59a0aa3c896c7aa697.zip
Merge tag 'v5.4-rc5' into next
Sync up with mainline.
Diffstat (limited to 'drivers/media/usb/gspca/sn9c20x.c')
-rw-r--r--drivers/media/usb/gspca/sn9c20x.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c
index b43f89fee6c1..2a6d0a1265a7 100644
--- a/drivers/media/usb/gspca/sn9c20x.c
+++ b/drivers/media/usb/gspca/sn9c20x.c
@@ -124,6 +124,13 @@ static const struct dmi_system_id flip_dmi_table[] = {
}
},
{
+ .ident = "MSI MS-1039",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "MICRO-STAR INT'L CO.,LTD."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "MS-1039"),
+ }
+ },
+ {
.ident = "MSI MS-1632",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "MSI"),
@@ -909,6 +916,11 @@ static void reg_r(struct gspca_dev *gspca_dev, u16 reg, u16 length)
if (unlikely(result < 0 || result != length)) {
pr_err("Read register %02x failed %d\n", reg, result);
gspca_dev->usb_err = result;
+ /*
+ * Make sure the buffer is zeroed to avoid uninitialized
+ * values.
+ */
+ memset(gspca_dev->usb_buf, 0, USB_BUF_SZ);
}
}