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.carpen...@oracle.com>

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 linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to