Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@suse.de>
To: Kulikov Vasiliy <segooon@gmail.com>
Cc: Kernel Janitors <kernel-janitors@vger.kernel.org>,
	Tejun Heo <tj@kernel.org>,
	David Brownell <dbrownell@users.sourceforge.net>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	linux-kernel@vger.kernel.org,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] enclosure: fix lost return
Date: Tue, 06 Jul 2010 10:39:19 -0500	[thread overview]
Message-ID: <1278430759.2854.80.camel@mulgrave.site> (raw)
In-Reply-To: <1278430088-9761-1-git-send-email-segooon@gmail.com>

On Tue, 2010-07-06 at 19:28 +0400, Kulikov Vasiliy wrote:
> Useless statement must be return with argument.
> 
> This patch silences a compiler warning:
> drivers/misc/enclosure.c: In function ‘enclosure_component_register’:
> drivers/misc/enclosure.c:289: warning: ignoring return value of ‘ERR_PTR’, declared with attribute warn_unused_result
> 
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
>  drivers/misc/enclosure.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/misc/enclosure.c b/drivers/misc/enclosure.c
> index 48c84a5..9ae7bef 100644
> --- a/drivers/misc/enclosure.c
> +++ b/drivers/misc/enclosure.c
> @@ -286,7 +286,7 @@ enclosure_component_register(struct enclosure_device *edev,
>  
>  	err = device_register(cdev);
>  	if (err)
> -		ERR_PTR(err);
> +		return ERR_PTR(err);

Well, the patch isn't quite correct, but I think I win a prize for
working out what the correct patch was and then forgetting to apply it:

http://marc.info/?l=linux-scsi&m=126843630320666

I've actually put it in my tree this time ...

James


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

           reply	other threads:[~2010-07-06 15:39 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1278430088-9761-1-git-send-email-segooon@gmail.com>]

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=1278430759.2854.80.camel@mulgrave.site \
    --to=james.bottomley@suse.de \
    --cc=dbrownell@users.sourceforge.net \
    --cc=gregkh@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=segooon@gmail.com \
    --cc=tj@kernel.org \
    /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