Skip to contentSkip to conversation

paride: fix a return in pd_detect()

PATCH In review Dan Carpenter 2 participants 2 messages Aug 12, 2015 – Aug 13, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 paride: fix a return in pd_detect()

In this function returning non-zero means the hardware was detected and zero means it wasn't. This is a failure path so we should return zero.

Fixes 9f4ba6b05869 ('paride: use new parport device model')
drivers/block/paride/pd.c +1 -1
index b9242d7..4e75c5f 100644
@@ -877,7 +877,7 @@ static int pd_detect(void)
 	par_drv = pi_register_driver(name);
 	if (!par_drv) {
 		pr_err("failed to register %s driver\n", name);
-		return -1;
+		return 0;
 	}
 
 	if (pd_drive_count = 0) { /* nothing spec'd - so autoprobe for 1 */