netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>
To: Julia Lawall <Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Gustavo Padovan <gustavo-THi1TnShQwVAfugRpC6u6w@public.gmane.org>,
	Johan Hedberg
	<johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 4/7] net/bluetooth/rfcomm/core.c: fix error return code
Date: Wed, 29 Aug 2012 11:23:29 -0700	[thread overview]
Message-ID: <1346264609.23377.6.camel@aeonflux> (raw)
In-Reply-To: <1346258957-7649-5-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>

Hi Julia,

> 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-L2FTfq7BK8M@public.gmane.org>
> 
> ---
>  net/bluetooth/rfcomm/core.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Acked-by: Marcel Holtmann <marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>

Regards

Marcel

  parent reply	other threads:[~2012-08-29 18:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1346258957-7649-1-git-send-email-Julia.Lawall@lip6.fr>
2012-08-29 16:49 ` [PATCH 1/7] ipvs: fix error return code Julia Lawall
2012-08-30  1:12   ` Simon Horman
2012-08-30  1:34   ` Pablo Neira Ayuso
2012-08-29 16:49 ` [PATCH 2/7] net: ipv6: " Julia Lawall
2012-08-31 20:28   ` David Miller
     [not found] ` <1346258957-7649-1-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
2012-08-29 16:49   ` [PATCH 4/7] net/bluetooth/rfcomm/core.c: " Julia Lawall
     [not found]     ` <1346258957-7649-5-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
2012-08-29 18:23       ` Marcel Holtmann [this message]
2012-08-29 16:49 ` [PATCH 5/7] net/xfrm/xfrm_state.c: " Julia Lawall
2012-08-31 20:28   ` David Miller
2012-08-29 16:49 ` [PATCH 7/7] net/netfilter/nf_conntrack_netlink.c: " Julia Lawall
2012-08-30  1:35   ` Pablo Neira Ayuso
2012-08-29 16:49 ` [PATCH 6/7] net/netfilter/nfnetlink_log.c: " Julia Lawall
2012-08-30  1:35   ` Pablo Neira Ayuso

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=1346264609.23377.6.camel@aeonflux \
    --to=marcel-kz+m5ild9qbg9huczpvpmw@public.gmane.org \
    --cc=Julia.Lawall-L2FTfq7BK8M@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=gustavo-THi1TnShQwVAfugRpC6u6w@public.gmane.org \
    --cc=johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).