From: James Simmons <jsimmons@infradead.org>
To: Julia Lawall <julia@diku.dk>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 10/11] drivers/video/mbx: Correct NULL test
Date: Tue, 09 Feb 2010 19:18:00 +0000 [thread overview]
Message-ID: <alpine.LFD.2.00.1002091917340.26270@casper.infradead.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1002060944400.8092@ask.diku.dk>
> From: Julia Lawall <julia@diku.dk>
>
> Test the value that was just allocated rather than the previously tested one.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @r@
> expression *x;
> expression e;
> identifier l;
> @@
>
> if (x = NULL || ...) {
> ... when forall
> return ...; }
> ... when != goto l;
> when != x = e
> when != &x
> *x = NULL
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: James Simmons <jsimmons@infradead.org>
> ---
> drivers/video/mbx/mbxfb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/mbx/mbxfb.c b/drivers/video/mbx/mbxfb.c
> index afea9ab..7140405 100644
> --- a/drivers/video/mbx/mbxfb.c
> +++ b/drivers/video/mbx/mbxfb.c
> @@ -950,7 +950,7 @@ static int __devinit mbxfb_probe(struct platform_device *dev)
>
> mfbi->fb_virt_addr = ioremap_nocache(mfbi->fb_phys_addr,
> res_size(mfbi->fb_req));
> - if (!mfbi->reg_virt_addr) {
> + if (!mfbi->fb_virt_addr) {
> dev_err(&dev->dev, "failed to ioremap frame buffer\n");
> ret = -EINVAL;
> goto err4;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2010-02-09 19:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-06 8:44 [PATCH 10/11] drivers/video/mbx: Correct NULL test Julia Lawall
2010-02-09 19:18 ` James Simmons [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=alpine.LFD.2.00.1002091917340.26270@casper.infradead.org \
--to=jsimmons@infradead.org \
--cc=julia@diku.dk \
--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).