linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emil Goode <emilgoode@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: FlorianSchandinat@gmx.de, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] grvga: Fix error handling issues
Date: Sun, 24 Jun 2012 09:42:27 +0000	[thread overview]
Message-ID: <1340530947.4696.3.camel@localhost> (raw)
In-Reply-To: <20120623223319.GG5333@mwanda>

This code is for the sparc architecture and the iounmap doesn't check
for NULL directly as in the x86 version. I think it is safer not to pass
NULL to the sparc version.

Thanks,

Emil
On Sun, 2012-06-24 at 01:33 +0300, Dan Carpenter wrote:
> On Fri, Jun 22, 2012 at 06:11:19PM +0200, Emil Goode wrote:
> > This patch fixes two problems with the error handling in the
> > grvga_probe function.
> > 
> > - If the call to grvga_parse_custom on line 370 fails we use
> >   the wrong label so that release_mem_region will be called
> >   without a call to request_mem_region being made.
> > 
> > - If the call to ioremap on line 436 fails we should not try
> >   to call iounmap. I added an if statement to check whether or
> >   not a call to iounmap should be made.
> > 
> 
> Doesn't iounmap() have a check for NULL?  On x86 it does.
> 
> 	if ((void __force *)addr <= high_memory)
> 		return;
> 
> regards,
> dan carpenter
> 
> 



      reply	other threads:[~2012-06-24  9:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 16:11 [PATCH] grvga: Fix error handling issues Emil Goode
2012-06-22 16:12 ` Julia Lawall
2012-06-22 16:20   ` Emil Goode
2012-06-22 16:21     ` Julia Lawall
2012-06-23 22:01       ` Emil Goode
2012-06-24  5:15         ` Julia Lawall
2012-06-24  5:18           ` Julia Lawall
2012-06-24 10:36           ` Emil Goode
2012-06-25  5:20             ` Julia Lawall
2012-06-25  9:58               ` Emil Goode
2012-06-23 22:33 ` Dan Carpenter
2012-06-24  9:42   ` Emil Goode [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=1340530947.4696.3.camel@localhost \
    --to=emilgoode@gmail.com \
    --cc=FlorianSchandinat@gmx.de \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).