Skip to contentSkip to conversation

fix synclink_gt diagnostics error reporting

PATCH New Paul Fulghum 1 participant 1 message Jun 21, 2006 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix synclink_gt diagnostics error reporting

Fix diagnostics error reporting that was being
overwritten by incorrect use of return codes from
individual diagnostic functions.

drivers/char/synclink_gt.c +3 -3
@@ -4671,13 +4671,13 @@ static int loopback_test(struct slgt_inf
 static int adapter_test(struct slgt_info *info)
 {
 	DBGINFO(("testing %s\n", info->device_name));
-	if ((info->init_error = register_test(info)) < 0) {
+	if (register_test(info) < 0) {
 		printk("register test failure %s addr=%08X\n",
 			info->device_name, info->phys_reg_addr);
-	} else if ((info->init_error = irq_test(info)) < 0) {
+	} else if (irq_test(info) < 0) {
 		printk("IRQ test failure %s IRQ=%d\n",
 			info->device_name, info->irq_level);
-	} else if ((info->init_error = loopback_test(info)) < 0) {
+	} else if (loopback_test(info) < 0) {
 		printk("loopback test failure %s\n", info->device_name);
 	}
 	return info->init_error;