All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Büsch" <m@bues.ch>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: linux-wireless@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>
Subject: Re: [PATCH] ssb: Delete an error message for a failed memory allocation in ssb_devices_register()
Date: Wed, 17 May 2017 20:46:24 +0000	[thread overview]
Message-ID: <20170517224624.6c0ababc@wiggum> (raw)
In-Reply-To: <b8db3326-5f45-04c0-a6c3-d5183d602e8d@users.sourceforge.net>

[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]

On Wed, 17 May 2017 18:22:49 +0200
SF Markus Elfring <elfring@users.sourceforge.net> wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 17 May 2017 18:12:16 +0200
> 
> Omit an extra message for a memory allocation failure in this function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/ssb/main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
> index d1a750760cf3..65420a9f0e82 100644
> --- a/drivers/ssb/main.c
> +++ b/drivers/ssb/main.c
> @@ -480,7 +480,6 @@ static int ssb_devices_register(struct ssb_bus *bus)
>  
>  		devwrap = kzalloc(sizeof(*devwrap), GFP_KERNEL);
>  		if (!devwrap) {
> -			ssb_err("Could not allocate device\n");
>  			err = -ENOMEM;
>  			goto error;
>  		}


This looks good.

Acked-by: Michael Büsch <m@bues.ch>


-- 
Michael

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: "Michael Büsch" <m@bues.ch>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: linux-wireless@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>
Subject: Re: [PATCH] ssb: Delete an error message for a failed memory allocation in ssb_devices_register()
Date: Wed, 17 May 2017 22:46:24 +0200	[thread overview]
Message-ID: <20170517224624.6c0ababc@wiggum> (raw)
In-Reply-To: <b8db3326-5f45-04c0-a6c3-d5183d602e8d@users.sourceforge.net>

[-- Attachment #1: Type: text/plain, Size: 1073 bytes --]

On Wed, 17 May 2017 18:22:49 +0200
SF Markus Elfring <elfring@users.sourceforge.net> wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 17 May 2017 18:12:16 +0200
> 
> Omit an extra message for a memory allocation failure in this function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/ssb/main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
> index d1a750760cf3..65420a9f0e82 100644
> --- a/drivers/ssb/main.c
> +++ b/drivers/ssb/main.c
> @@ -480,7 +480,6 @@ static int ssb_devices_register(struct ssb_bus *bus)
>  
>  		devwrap = kzalloc(sizeof(*devwrap), GFP_KERNEL);
>  		if (!devwrap) {
> -			ssb_err("Could not allocate device\n");
>  			err = -ENOMEM;
>  			goto error;
>  		}


This looks good.

Acked-by: Michael Büsch <m@bues.ch>


-- 
Michael

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-05-17 20:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17 16:22 [PATCH] ssb: Delete an error message for a failed memory allocation in ssb_devices_register() SF Markus Elfring
2017-05-17 16:22 ` SF Markus Elfring
2017-05-17 20:46 ` Michael Büsch [this message]
2017-05-17 20:46   ` Michael Büsch
2017-05-24 13:47 ` Kalle Valo
2017-05-24 13:47   ` Kalle Valo

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=20170517224624.6c0ababc@wiggum \
    --to=m@bues.ch \
    --cc=elfring@users.sourceforge.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /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 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.