All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] paride: fix a return in pd_detect()
@ 2015-08-12 21:08 ` Dan Carpenter
  0 siblings, 0 replies; 4+ 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] 4+ messages in thread

* [patch] paride: fix a return in pd_detect()
@ 2015-08-12 21:08 ` Dan Carpenter
  0 siblings, 0 replies; 4+ 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] 4+ messages in thread

* Re: [patch] paride: fix a return in pd_detect()
  2015-08-12 21:08 ` Dan Carpenter
@ 2015-08-13 12:22   ` Sudip Mukherjee
  -1 siblings, 0 replies; 4+ messages in thread
From: Sudip Mukherjee @ 2015-08-13 12:10 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Tim Waugh, linux-kernel, kernel-janitors, Greg Kroah-Hartman

On Thu, Aug 13, 2015 at 12:08:43AM +0300, Dan Carpenter wrote:
> 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>

Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>

regards
sudip

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

* Re: [patch] paride: fix a return in pd_detect()
@ 2015-08-13 12:22   ` Sudip Mukherjee
  0 siblings, 0 replies; 4+ messages in thread
From: Sudip Mukherjee @ 2015-08-13 12:22 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Tim Waugh, linux-kernel, kernel-janitors, Greg Kroah-Hartman

On Thu, Aug 13, 2015 at 12:08:43AM +0300, Dan Carpenter wrote:
> 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>

Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>

regards
sudip

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

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

Thread overview: 4+ 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-12 21:08 ` Dan Carpenter
2015-08-13 12:10 ` Sudip Mukherjee
2015-08-13 12:22   ` Sudip Mukherjee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.