From: Peter Senna Tschudin
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
//
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; }
@unchanged exists@
position r.p1,r.p2;
expression e <= r.x,x,e1;
iterator I;
2012/9/11 Peter Senna Tschudin :
> From: Peter Senna Tschudin
>
> The semantic patch that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> //
> @r exists@
> position p1,p2;
> expression x;
> @@
>
> if (x@p1 == NULL) { ... kfree@p2(x); ... return ...; }
>
> @unchanged exists@
>
On Tue, Sep 11, 2012 at 08:00:32PM +0200, Peter Senna Tschudin wrote:
> diff --git a/drivers/media/dvb-frontends/lg2160.c
> b/drivers/media/dvb-frontends/lg2160.c
> index cc11260..748da5d 100644
> --- a/drivers/media/dvb-frontends/lg2160.c
> +++ b/drivers/media/dvb-frontends/lg2160.c
> @@ -1451,7
I'll split this patch in one patch for file and resend.
On Wed, Sep 12, 2012 at 10:06 AM, Dan Carpenter
wrote:
> On Tue, Sep 11, 2012 at 08:00:32PM +0200, Peter Senna Tschudin wrote:
>> diff --git a/drivers/media/dvb-frontends/lg2160.c
>> b/drivers/media/dvb-frontends/lg2160.c
>> index cc11260..