Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7474cf9 authored by Andoni Zubimendi's avatar Andoni Zubimendi Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (8361): gspca: Bad check of i2c write to sn9c10x.

parent 794af52a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -456,9 +456,12 @@ static int i2c_w(struct gspca_dev *gspca_dev, const __u8 *buffer)
	while (retry--) {
		msleep(10);
		reg_r(gspca_dev, 0x08);
		if (gspca_dev->usb_buf[0] == 4)
		if (gspca_dev->usb_buf[0] & 0x04) {
			if (gspca_dev->usb_buf[0] & 0x08)
				return -1;
			return 0;
		}
	}
	return -1;
}