* [PATCH] video: igafb: introduce lost 'return'
@ 2010-07-31 16:34 Kulikov Vasiliy
2010-08-02 23:01 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Kulikov Vasiliy @ 2010-07-31 16:34 UTC (permalink / raw)
To: kernel-janitors; +Cc: linux-kernel
If iga_init() fails, code releases resources and continues to use it.
It seems that after releasing resources 'return' should be.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
drivers/video/igafb.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c
index 15d2001..c4e6fc0 100644
--- a/drivers/video/igafb.c
+++ b/drivers/video/igafb.c
@@ -531,6 +531,7 @@ int __init igafb_init(void)
iounmap(info->screen_base);
kfree(par->mmap_map);
kfree(info);
+ return -ENODEV;
}
#ifdef CONFIG_SPARC
--
1.7.0.4
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] video: igafb: introduce lost 'return'
2010-07-31 16:34 [PATCH] video: igafb: introduce lost 'return' Kulikov Vasiliy
@ 2010-08-02 23:01 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2010-08-02 23:01 UTC (permalink / raw)
To: Kulikov Vasiliy; +Cc: kernel-janitors, linux-kernel
On Sat, 31 Jul 2010 20:34:30 +0400
Kulikov Vasiliy <segooon@gmail.com> wrote:
> If iga_init() fails, code releases resources and continues to use it.
> It seems that after releasing resources 'return' should be.
>
> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
> ---
> drivers/video/igafb.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c
> index 15d2001..c4e6fc0 100644
> --- a/drivers/video/igafb.c
> +++ b/drivers/video/igafb.c
> @@ -531,6 +531,7 @@ int __init igafb_init(void)
> iounmap(info->screen_base);
> kfree(par->mmap_map);
> kfree(info);
> + return -ENODEV;
> }
>
> #ifdef CONFIG_SPARC
Fair enough.
We may as well do this, too:
--- a/drivers/video/igafb.c~drivers-video-igafbc-make-igafb_setup-and-igafb_init-static
+++ a/drivers/video/igafb.c
@@ -368,7 +368,7 @@ static int __init iga_init(struct fb_inf
return 1;
}
-int __init igafb_init(void)
+static int __init igafb_init(void)
{
struct fb_info *info;
struct pci_dev *pdev;
@@ -557,7 +557,7 @@ int __init igafb_init(void)
return 0;
}
-int __init igafb_setup(char *options)
+static int __init igafb_setup(char *options)
{
char *this_opt;
_
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-02 23:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-31 16:34 [PATCH] video: igafb: introduce lost 'return' Kulikov Vasiliy
2010-08-02 23:01 ` Andrew Morton
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®