linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] isdn: hisax: set error code on failure
@ 2016-12-04 10:33 Pan Bian
  2016-12-04 10:40 ` Sergei Shtylyov
  0 siblings, 1 reply; 4+ messages in thread
From: Pan Bian @ 2016-12-04 10:33 UTC (permalink / raw)
  To: Sergei Shtylyov, Karsten Keil, netdev; +Cc: linux-kernel, Pan Bian

From: Pan Bian <bianpan2016@163.com>

In function hfc4s8s_probe(), the value of return variable err should be
negative on failures. However, when the call to request_region() returns
NULL, the value of err is 0. This patch fixes the bug, assiging
"-EBUSY" to err on the path that request_region() fails.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188931

Signed-off-by: Pan Bian <bianpan2016@163.com>
---
 drivers/isdn/hisax/hfc4s8s_l1.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
index 9600cd7..3172cee 100644
--- a/drivers/isdn/hisax/hfc4s8s_l1.c
+++ b/drivers/isdn/hisax/hfc4s8s_l1.c
@@ -1499,6 +1499,7 @@ struct hfc4s8s_l1 {
 		printk(KERN_INFO
 		       "HFC-4S/8S: failed to request address space at 0x%04x\n",
 		       hw->iobase);
+		err = -EBUSY;
 		goto out;
 	}
 
-- 
1.9.1

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

* Re: [PATCH 1/1] isdn: hisax: set error code on failure
  2016-12-04 10:33 [PATCH 1/1] isdn: hisax: set error code on failure Pan Bian
@ 2016-12-04 10:40 ` Sergei Shtylyov
  0 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2016-12-04 10:40 UTC (permalink / raw)
  To: Pan Bian, Karsten Keil, netdev; +Cc: linux-kernel, Pan Bian

On 12/4/2016 1:33 PM, Pan Bian wrote:

   You now need to indicate the patch version in hte subject, like this:

[PATCH 1/1 v2] isdn:...

> From: Pan Bian <bianpan2016@163.com>
>
> In function hfc4s8s_probe(), the value of return variable err should be
> negative on failures. However, when the call to request_region() returns
> NULL, the value of err is 0. This patch fixes the bug, assiging

    Assigning.

> "-EBUSY" to err on the path that request_region() fails.
>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188931
>
> Signed-off-by: Pan Bian <bianpan2016@163.com>
> ---

    And here you're supposed to describe changes in the different patch 
versions...

[...]

MBR, Sergei

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

* Re: [PATCH 1/1] isdn: hisax: set error code on failure
  2016-12-04  5:15 Pan Bian
@ 2016-12-04 10:14 ` Sergei Shtylyov
  0 siblings, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2016-12-04 10:14 UTC (permalink / raw)
  To: Pan Bian, Karsten Keil, netdev; +Cc: linux-kernel, Pan Bian

Hello.

On 12/4/2016 8:15 AM, Pan Bian wrote:

> From: Pan Bian <bianpan2016@163.com>
>
> In function hfc4s8s_probe(), the value of return variable err should be
> negative on failures. However, when the call to request_region() returns
> NULL, the value of err is 0. This patch fixes the bug, assiging
> "-ENOMEM" to err on the path that request_region() fails.
>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188931
>
> Signed-off-by: Pan Bian <bianpan2016@163.com>
> ---
>  drivers/isdn/hisax/hfc4s8s_l1.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
> index 9600cd7..3172cee 100644
> --- a/drivers/isdn/hisax/hfc4s8s_l1.c
> +++ b/drivers/isdn/hisax/hfc4s8s_l1.c
> @@ -1499,6 +1499,7 @@ struct hfc4s8s_l1 {
>  		printk(KERN_INFO
>  		       "HFC-4S/8S: failed to request address space at 0x%04x\n",
>  		       hw->iobase);
> +		err = -ENOMEM;

    -EBUSY fits request_region() better.

[..]

MBR, Sergei

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

* [PATCH 1/1] isdn: hisax: set error code on failure
@ 2016-12-04  5:15 Pan Bian
  2016-12-04 10:14 ` Sergei Shtylyov
  0 siblings, 1 reply; 4+ messages in thread
From: Pan Bian @ 2016-12-04  5:15 UTC (permalink / raw)
  To: Karsten Keil, netdev; +Cc: linux-kernel, Pan Bian

From: Pan Bian <bianpan2016@163.com>

In function hfc4s8s_probe(), the value of return variable err should be
negative on failures. However, when the call to request_region() returns
NULL, the value of err is 0. This patch fixes the bug, assiging
"-ENOMEM" to err on the path that request_region() fails.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188931

Signed-off-by: Pan Bian <bianpan2016@163.com>
---
 drivers/isdn/hisax/hfc4s8s_l1.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
index 9600cd7..3172cee 100644
--- a/drivers/isdn/hisax/hfc4s8s_l1.c
+++ b/drivers/isdn/hisax/hfc4s8s_l1.c
@@ -1499,6 +1499,7 @@ struct hfc4s8s_l1 {
 		printk(KERN_INFO
 		       "HFC-4S/8S: failed to request address space at 0x%04x\n",
 		       hw->iobase);
+		err = -ENOMEM;
 		goto out;
 	}
 
-- 
1.9.1

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

end of thread, other threads:[~2016-12-04 10:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-04 10:33 [PATCH 1/1] isdn: hisax: set error code on failure Pan Bian
2016-12-04 10:40 ` Sergei Shtylyov
  -- strict thread matches above, loose matches on Subject: below --
2016-12-04  5:15 Pan Bian
2016-12-04 10:14 ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).