* [PATCH] leds: fix the return value of ich7_lpc_probe.
@ 2009-11-28 15:48 Thiago Farina
2009-11-28 19:47 ` Dave Hansen
0 siblings, 1 reply; 2+ messages in thread
From: Thiago Farina @ 2009-11-28 15:48 UTC (permalink / raw)
To: linux-kernel; +Cc: rpurdie, dave, martinez.javier, Thiago Farina
In the function ich7_lpc_probe there is a 'return' that is not returning any
value, but it should because the return type is int not void.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
drivers/leds/leds-ss4200.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/leds/leds-ss4200.c b/drivers/leds/leds-ss4200.c
index c7f6347..a0c4092 100644
--- a/drivers/leds/leds-ss4200.c
+++ b/drivers/leds/leds-ss4200.c
@@ -350,7 +350,7 @@ static int __devinit ich7_lpc_probe(struct pci_dev *dev,
status = pci_enable_device(dev);
if (status) {
dev_err(&dev->dev, "pci_enable_device failed\n");
- return;
+ return status;
}
nas_gpio_pci_dev = dev;
--
1.6.6.rc0.61.g41d5b
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] leds: fix the return value of ich7_lpc_probe.
2009-11-28 15:48 [PATCH] leds: fix the return value of ich7_lpc_probe Thiago Farina
@ 2009-11-28 19:47 ` Dave Hansen
0 siblings, 0 replies; 2+ messages in thread
From: Dave Hansen @ 2009-11-28 19:47 UTC (permalink / raw)
To: Thiago Farina; +Cc: linux-kernel, rpurdie, martinez.javier
On Sat, 2009-11-28 at 10:48 -0500, Thiago Farina wrote:
> In the function ich7_lpc_probe there is a 'return' that is not returning any
> value, but it should because the return type is int not void.
>
> Signed-off-by: Thiago Farina <tfransosi@gmail.com>
> ---
> drivers/leds/leds-ss4200.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/leds/leds-ss4200.c b/drivers/leds/leds-ss4200.c
> index c7f6347..a0c4092 100644
> --- a/drivers/leds/leds-ss4200.c
> +++ b/drivers/leds/leds-ss4200.c
> @@ -350,7 +350,7 @@ static int __devinit ich7_lpc_probe(struct pci_dev *dev,
> status = pci_enable_device(dev);
> if (status) {
> dev_err(&dev->dev, "pci_enable_device failed\n");
> - return;
> + return status;
> }
There's a patch in -mm to do something similar. It should be pushed
upstream when the next set of -mm patches goes.
http://userweb.kernel.org/~akpm/mmotm/broken-out/drivers-leds-leds-ss4200c-fix-return-statement.patch
Thanks for posting this, though.
-- Dave
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-28 19:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-28 15:48 [PATCH] leds: fix the return value of ich7_lpc_probe Thiago Farina
2009-11-28 19:47 ` Dave Hansen
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®