From: Andrew Morton <akpm@linux-foundation.org>
To: Kulikov Vasiliy <segooon@gmail.com>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video: igafb: introduce lost 'return'
Date: Mon, 2 Aug 2010 16:01:29 -0700 [thread overview]
Message-ID: <20100802160129.8ca0cf05.akpm@linux-foundation.org> (raw)
In-Reply-To: <1280594070-3328-1-git-send-email-segooon@gmail.com>
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;
_
prev parent reply other threads:[~2010-08-02 23:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-31 16:34 Kulikov Vasiliy
2010-08-02 23:01 ` Andrew Morton [this message]
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=20100802160129.8ca0cf05.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=segooon@gmail.com \
/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
all inboxes | Powered by JetHome®