* [PATCH] enclosure: fix lost return
@ 2010-07-06 15:28 Kulikov Vasiliy
2010-07-06 15:39 ` James Bottomley
0 siblings, 1 reply; 2+ messages in thread
From: Kulikov Vasiliy @ 2010-07-06 15:28 UTC (permalink / raw)
To: Kernel Janitors
Cc: James Bottomley, Tejun Heo, David Brownell, Greg Kroah-Hartman,
linux-kernel
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);
return ecomp;
}
--
1.7.0.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] enclosure: fix lost return
2010-07-06 15:28 [PATCH] enclosure: fix lost return Kulikov Vasiliy
@ 2010-07-06 15:39 ` James Bottomley
0 siblings, 0 replies; 2+ messages in thread
From: James Bottomley @ 2010-07-06 15:39 UTC (permalink / raw)
To: Kulikov Vasiliy
Cc: Kernel Janitors, Tejun Heo, David Brownell, Greg Kroah-Hartman,
linux-kernel, linux-scsi
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-06 15:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-06 15:28 [PATCH] enclosure: fix lost return Kulikov Vasiliy
2010-07-06 15:39 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®