patch-2.1.131 linux/drivers/char/joystick/joy-lightning.c

Next file: linux/drivers/char/joystick/joy-logitech.c
Previous file: linux/drivers/char/joystick/joy-gravis.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.130/linux/drivers/char/joystick/joy-lightning.c linux/drivers/char/joystick/joy-lightning.c
@@ -352,9 +352,9 @@
 	int cal[4] = {59, 59, 59, 59};
 	struct js_l4_info *info;
 
-	while (js_l4_port) {
+	while (js_l4_port != NULL) {
 		for (i = 0; i < js_l4_port->ndevs; i++)
-			if (js_l4_port->devs[i])
+			if (js_l4_port->devs[i] != NULL)
 				js_unregister_device(js_l4_port->devs[i]);
 		info = js_l4_port->info;
 		js_l4_setcal(info->port, cal);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov