X86 platform drivers
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Ernst, Justin" <justin.ernst@hpe.com>,
	Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mark Gross <mgross@linux.intel.com>, Borislav Petkov <bp@suse.de>,
	"Wahl, Steve" <steve.wahl@hpe.com>,
	"platform-driver-x86@vger.kernel.org" 
	<platform-driver-x86@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] x86/platform/uv: Fix an error code in uv_hubs_init()
Date: Mon, 7 Dec 2020 11:43:17 +0100	[thread overview]
Message-ID: <9e3c4e1c-b7fa-1b1f-342d-cb23e0065a56@redhat.com> (raw)
In-Reply-To: <AT5PR8401MB1300A04A58C46C822424F46787F30@AT5PR8401MB1300.NAMPRD84.PROD.OUTLOOK.COM>

Hi,

On 12/2/20 9:50 PM, Ernst, Justin wrote:
>> Return -ENOMEM on allocation failure instead of returning success.
>>
>> Fixes: 4fc2cf1f2daf ("x86/platform/uv: Add new uv_sysfs platform driver")
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Thank you for taking the time to find this.
> 
> Reviewed-by: Justin Ernst <justin.ernst@hpe.com> 
> (With an acknowledgement of Boris's 's/success/random stack memory contents/' comment)

ATM the drivers/platform/x86/uv_sysfs.c only exists in the tip/x86 tree -next
branch, so this fix needs to be merged through the tip/x86 tree, here is my ack
for merging it that way:

Acked-by: Hans de Goede <hdegoede@redhat.com>

(either with a fixed up commit-msg as suggested by Borislav, or feel
free to add it to a fixed v2 of the patch)

Regards,

Hans



> 
>> ---
>>  drivers/platform/x86/uv_sysfs.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/platform/x86/uv_sysfs.c b/drivers/platform/x86/uv_sysfs.c
>> index 54c342579f1c..e17ce8c4cdad 100644
>> --- a/drivers/platform/x86/uv_sysfs.c
>> +++ b/drivers/platform/x86/uv_sysfs.c
>> @@ -248,6 +248,7 @@ static int uv_hubs_init(void)
>>  		uv_hubs[i] = kzalloc(sizeof(*uv_hubs[i]), GFP_KERNEL);
>>  		if (!uv_hubs[i]) {
>>  			i--;
>> +			ret = -ENOMEM;
>>  			goto err_hubs;
>>  		}
>>
>> --
>> 2.29.2
> 


      reply	other threads:[~2020-12-07 10:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 14:44 [PATCH] x86/platform/uv: Fix an error code in uv_hubs_init() Dan Carpenter
2020-12-02 19:51 ` Borislav Petkov
2020-12-02 20:50 ` Ernst, Justin
2020-12-07 10:43   ` Hans de Goede [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e3c4e1c-b7fa-1b1f-342d-cb23e0065a56@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=bp@suse.de \
    --cc=dan.carpenter@oracle.com \
    --cc=justin.ernst@hpe.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=steve.wahl@hpe.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox