Skip to contentSkip to conversation

V4L/DVB: gspca: &/&& typo

PATCH Erik Andrén 1 participant 1 message Dec 27, 2008 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Roel Kluin

---

drivers/media/video/gspca/m5602/m5602_s5k4aa.c +0 -0
index 14b1eac..c3ebcca 100644

drivers/media/video/gspca/m5602/m5602_s5k4aa.c int s5k4aa_read_sensor(struct sd *sd, const u8 address, · line 120

Quoted 8 lines
drivers/media/video/gspca/m5602/m5602_s5k4aa.c +1 -1
@@ -114,7 +114,7 @@ int s5k4aa_read_sensor(struct sd *sd, const u8 address,
 	if (err < 0)
 		goto out;
 
-	for (i = 0; (i < len) & !err; i++) {
+	for (i = 0; (i < len) && !err; i++) {
 		err = m5602_read_bridge(sd, M5602_XB_I2C_DATA, &(i2c_data[i]));
 
 		PDEBUG(D_CONF, "Reading sensor register "

Thanks Roel,

Current 2.6.29 ready code doesn't have this bug as the driver is reworked. It's there in the 2.6.28 code but shouldn't pose a problem as the err variable should normally evaluate itself to 0 which is inverted to true (== 1?) thus as (1 < len) is evaluated to true the statement should work as intended. I don't have hardware supporting the s5k4aa but I replicated the bug with my ov9650 sensor code and it still worked as intended.

Summary: Mauro, If you want to add this fix for 2.6.28, go ahead but
the current code 2.6.28 shouldn't prevent the driver from working
as intended. This is not an issue in the current gspca-m5602 tree.

Regards,
Erik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklWiusACgkQN7qBt+4UG0EHLQCeK+lbrEM/upfGjcwQAQxSgNNG SvEAmQGSHlgRJfxZX981jgHH8akpLsbM
=gpZy
-----END PGP SIGNATURE-----

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list