[patch] paride: fix a return in pd_detect()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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')
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index b9242d7..4e75c5f 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -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 */
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux