public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] paride: fix a return in pd_detect()
@ 2015-08-12 21:08 Dan Carpenter
  2015-08-13 12:10 ` Sudip Mukherjee
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2015-08-12 21:08 UTC (permalink / raw)
  To: Tim Waugh, Sudip Mukherjee
  Cc: linux-kernel, kernel-janitors, Greg Kroah-Hartman

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@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 */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-13 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-12 21:08 [patch] paride: fix a return in pd_detect() Dan Carpenter
2015-08-13 12:10 ` Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox