diff mbox

ACPI / APEI: fix error return code in einj_init()

Message ID CAPgLHd-uB=hWRNCgoUhzFzsjQiPj1cuedUk0ttu1g7UXAx=3=Q@mail.gmail.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Wei Yongjun June 5, 2013, 2:17 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return -ENOMEM in the debugfs_create_xxx() error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/acpi/apei/einj.c | 1 +
 1 file changed, 1 insertion(+)


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Chen Gong June 5, 2013, 2:59 a.m. UTC | #1
On Wed, Jun 05, 2013 at 10:17:35AM +0800, Wei Yongjun wrote:
> Date: Wed, 5 Jun 2013 10:17:35 +0800
> From: Wei Yongjun <weiyj.lk@gmail.com>
> To: lenb@kernel.org, rjw@sisk.pl, gong.chen@linux.intel.com,
>  tony.luck@intel.com
> Cc: yongjun_wei@trendmicro.com.cn, linux-acpi@vger.kernel.org
> Subject: [PATCH] ACPI / APEI: fix error return code in einj_init()
> 
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return -ENOMEM in the debugfs_create_xxx() error handling
> case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  drivers/acpi/apei/einj.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
> index 9a47d85..9d60bdd 100644
> --- a/drivers/acpi/apei/einj.c
> +++ b/drivers/acpi/apei/einj.c
> @@ -732,6 +732,7 @@ static int __init einj_init(void)
>  	if (rc)
>  		goto err_release;
>  
> +	rc = -ENOMEM;
>  	einj_param = einj_get_parameter_address();
>  	if ((param_extension || acpi5) && einj_param) {
>  		fentry = debugfs_create_x64("param1", S_IRUSR | S_IWUSR,
> 
OK to me.

Reviewed-by: Chen Gong <gong.chen@linux.intel.com>
Rafael Wysocki June 11, 2013, 10:26 p.m. UTC | #2
On Tuesday, June 04, 2013 10:59:27 PM Chen Gong wrote:
> On Wed, Jun 05, 2013 at 10:17:35AM +0800, Wei Yongjun wrote:
> > Date: Wed, 5 Jun 2013 10:17:35 +0800
> > From: Wei Yongjun <weiyj.lk@gmail.com>
> > To: lenb@kernel.org, rjw@sisk.pl, gong.chen@linux.intel.com,
> >  tony.luck@intel.com
> > Cc: yongjun_wei@trendmicro.com.cn, linux-acpi@vger.kernel.org
> > Subject: [PATCH] ACPI / APEI: fix error return code in einj_init()
> > 
> > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> > 
> > Fix to return -ENOMEM in the debugfs_create_xxx() error handling
> > case instead of 0, as done elsewhere in this function.
> > 
> > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> > ---
> >  drivers/acpi/apei/einj.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
> > index 9a47d85..9d60bdd 100644
> > --- a/drivers/acpi/apei/einj.c
> > +++ b/drivers/acpi/apei/einj.c
> > @@ -732,6 +732,7 @@ static int __init einj_init(void)
> >  	if (rc)
> >  		goto err_release;
> >  
> > +	rc = -ENOMEM;
> >  	einj_param = einj_get_parameter_address();
> >  	if ((param_extension || acpi5) && einj_param) {
> >  		fentry = debugfs_create_x64("param1", S_IRUSR | S_IWUSR,
> > 
> OK to me.
> 
> Reviewed-by: Chen Gong <gong.chen@linux.intel.com>

Queued up for 3.11.

Thanks,
Rafael
Luck, Tony June 11, 2013, 11:04 p.m. UTC | #3
> Queued up for 3.11.


I'd independently queued this and a couple of other EINJ fixes from Chen Gong
in my RAS tree and tried to tempt Ingo to pull them for 3.11 (since this was the
route that we'd used for EINJ stuff in the past).

If you want them, then please pull what Ingo is ignoring.

Here's the e-mail with the please pull details:

http://marc.info/?l=linux-kernel&m=137062147012973&w=2

-Tony
Rafael Wysocki June 12, 2013, 11:13 a.m. UTC | #4
On Tuesday, June 11, 2013 11:04:51 PM Luck, Tony wrote:
> > Queued up for 3.11.
> 
> I'd independently queued this and a couple of other EINJ fixes from Chen Gong
> in my RAS tree and tried to tempt Ingo to pull them for 3.11 (since this was the
> route that we'd used for EINJ stuff in the past).
> 
> If you want them, then please pull what Ingo is ignoring.
> 
> Here's the e-mail with the please pull details:
> 
> http://marc.info/?l=linux-kernel&m=137062147012973&w=2

Well, as it happens, all of these patches are in my tree as well. :-)

I actually didn't know that there was a separate path to Linus for APEI
material.

Do you want to handle it going forward or do you want me to do that?  Or do
you want me to pull it from you?

Rafael
Luck, Tony June 12, 2013, 1:42 p.m. UTC | #5
> Well, as it happens, all of these patches are in my tree as well. :-)


Excellent!

> I actually didn't know that there was a separate path to Linus for APEI

> material.


It's one of the many gray areas ... APEI is clearly part of ACPI, but it is also
all about RAS too.

> Do you want to handle it going forward or do you want me to do that?  Or do

> you want me to pull it from you?


I think I'd like to take them into my tree and then have you pull them
into the ACPI tree.

-Tony
Rafael Wysocki June 12, 2013, 10:51 p.m. UTC | #6
On Wednesday, June 12, 2013 01:42:02 PM Luck, Tony wrote:
> > Well, as it happens, all of these patches are in my tree as well. :-)
> 
> Excellent!
> 
> > I actually didn't know that there was a separate path to Linus for APEI
> > material.
> 
> It's one of the many gray areas ... APEI is clearly part of ACPI, but it is also
> all about RAS too.

Yes, it is.

> > Do you want to handle it going forward or do you want me to do that?  Or do
> > you want me to pull it from you?
> 
> I think I'd like to take them into my tree and then have you pull them
> into the ACPI tree.

OK

Going forward I won't pick up any APEI patches from the list unless you tell
me to do that.

Thanks,
Rafael
diff mbox

Patch

diff --git a/drivers/acpi/apei/einj.c b/drivers/acpi/apei/einj.c
index 9a47d85..9d60bdd 100644
--- a/drivers/acpi/apei/einj.c
+++ b/drivers/acpi/apei/einj.c
@@ -732,6 +732,7 @@  static int __init einj_init(void)
 	if (rc)
 		goto err_release;
 
+	rc = -ENOMEM;
 	einj_param = einj_get_parameter_address();
 	if ((param_extension || acpi5) && einj_param) {
 		fentry = debugfs_create_x64("param1", S_IRUSR | S_IWUSR,