From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
To: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: kernel-janitors@vger.kernel.org, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 8/14] drivers/video/sunxvr2500.c: fix error return code
Date: Thu, 23 Aug 2012 20:48:25 +0000 [thread overview]
Message-ID: <50369719.9050306@gmx.de> (raw)
In-Reply-To: <1345365870-29831-9-git-send-email-Julia.Lawall@lip6.fr>
On 08/19/2012 08:44 AM, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Initialize return variable before exiting on an error path.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> (
> if@p1 (\(ret < 0\|ret != 0\))
> { ... return ret; }
> |
> ret@p1 = 0
> )
> ... when != ret = e1
> when != &ret
> *if(...)
> {
> ... when != ret = e2
> when forall
> return ret;
> }
>
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Applied.
Thanks,
Florian Tobias Schandinat
>
> ---
> drivers/video/sunxvr2500.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/video/sunxvr2500.c b/drivers/video/sunxvr2500.c
> index 5848436..7fbcba8 100644
> --- a/drivers/video/sunxvr2500.c
> +++ b/drivers/video/sunxvr2500.c
> @@ -181,8 +181,10 @@ static int __devinit s3d_pci_register(struct pci_dev *pdev,
> sp->fb_size = info->fix.line_length * sp->height;
>
> sp->fb_base = ioremap(sp->fb_base_phys, sp->fb_size);
> - if (!sp->fb_base)
> + if (!sp->fb_base) {
> + err = -ENOMEM;
> goto err_release_pci;
> + }
>
> err = s3d_set_fbinfo(sp);
> if (err)
>
>
next prev parent reply other threads:[~2012-08-23 20:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-19 8:44 [PATCH 0/14] fix error return code Julia Lawall
2012-08-19 8:44 ` [PATCH 1/14] drivers/rpmsg/virtio_rpmsg_bus.c: " Julia Lawall
2012-08-19 8:44 ` [PATCH 6/14] drivers/power/wm97xx_battery.c: " Julia Lawall
2012-08-19 8:44 ` [PATCH 5/14] drivers/power/ab8500_charger.c: " Julia Lawall
2012-08-19 8:44 ` [PATCH 4/14] drivers/power/bq27x00_battery.c: " Julia Lawall
2012-08-19 8:44 ` [PATCH 3/14] drivers/power/ab8500_fg.c: " Julia Lawall
2012-08-19 8:44 ` [PATCH 2/14] drivers/power/ab8500_btemp.c: " Julia Lawall
2012-08-23 1:51 ` Anton Vorontsov
2012-08-19 8:44 ` [PATCH 7/14] drivers/mtd/maps/rbtx4939-flash.c: delete unneeded test Julia Lawall
2012-08-25 11:04 ` Artem Bityutskiy
2012-08-19 8:44 ` [PATCH 8/14] drivers/video/sunxvr2500.c: fix error return code Julia Lawall
2012-08-23 20:48 ` Florian Tobias Schandinat [this message]
[not found] ` <1345365870-29831-1-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
2012-08-19 8:44 ` [PATCH 12/14] drivers/spi/spi-coldfire-qspi.c: " Julia Lawall
2012-08-19 8:44 ` [PATCH 11/14] drivers/spi/spi-orion.c: " Julia Lawall
2012-08-19 8:44 ` [PATCH 10/14] drivers/spi/spi-ep93xx.c: " Julia Lawall
2012-08-22 16:12 ` H Hartley Sweeten
2012-08-19 8:44 ` [PATCH 9/14] drivers/spi/spi-omap-100k.c: " Julia Lawall
2012-08-19 8:44 ` [PATCH 13/14] drivers/mtd/ubi/build.c: " Julia Lawall
2012-08-25 11:10 ` Artem Bityutskiy
2012-08-19 8:44 ` [PATCH 14/14] drivers/spi/spi-s3c24xx.c: " Julia Lawall
2012-08-22 9:38 ` Kukjin Kim
2012-08-22 11:40 ` Mark Brown
2012-08-22 11:42 ` Julia Lawall
2012-08-22 17:00 ` Mark Brown
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=50369719.9050306@gmx.de \
--to=florianschandinat@gmx.de \
--cc=Julia.Lawall@lip6.fr \
--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).