From: Peter Senna Tschudin
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return
From: Peter Senna Tschudin
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return
Please ignore this patch.
On Fri, Sep 14, 2012 at 5:13 PM, Peter Senna Tschudin
wrote:
> From: Peter Senna Tschudin
>
> Remove useless kfree() and clean up code related to the removal.
>
> The semantic patch that finds this problem is as follows:
> (http://coccinelle.lip6
> As I already applid your first patch, care to just send an incremental
> patch that makes the change you did here?
I've just sent a patch for that:
[PATCH] drivers/staging/gdm72xx/gdm_sdio.c: Replace kmalloc+memset for kzalloc
--
Peter
--
To unsubscribe from this list: send the line
Replace kmalloc+memset for kzalloc and cleanup related code.
To be applied after 47ad3428a1086af425447f763705e06b16ae905d:
[PATCH 5/9] drivers/staging/gdm72xx/gdm_sdio.c: Remove useless kfree
Signed-off-by: Peter Senna Tschudin
---
drivers/staging/gdm72xx/gdm_sdio.c | 6 ++
1 file changed
From: Peter Senna Tschudin
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return
On Mon, Sep 17, 2012 at 11:54 AM, Seungwon Jeon wrote:
> On Monday, September 17, 2012, Peter Senna Tschudin
> wrote:
>> From: Peter Senna Tschudin
>>
>> Convert a nonnegative error return code to a negative one, as returned
>> elsewhere in the functi
From: Peter Senna Tschudin
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return
From: Peter Senna Tschudin
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return
From: Peter Senna Tschudin
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return
From: Peter Senna Tschudin
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return
From: Peter Senna Tschudin
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return
From: Peter Senna Tschudin
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return
From: Peter Senna Tschudin
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
//
(
if@p1 (\(ret < 0\|ret != 0\))
{ ... return
Replace kmemdup for kstrdup and cleanup related code.
Signed-off-by: Peter Senna Tschudin
---
drivers/media/pci/cx25821/cx25821-audio-upstream.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/media/pci/cx25821/cx25821-audio-upstream.c
b/drivers/media
From: Peter Senna Tschudin
The function cx25821_sram_channel_setup_upstream_audio always return zero,
so the return value is not saved any more.
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version of the semantic match
GFP_KERNEL);
else
dev->_audiofilename = kstrdup(_defaultAudioName,
GFP_KERNEL);
if (!dev->_audiofilename) {
err = -ENOMEM;
goto error;
}
Signed-off-by: Peter Senna Tschudin
---
driver
(_defaultAudioName,
GFP_KERNEL);
if (!dev-_audiofilename) {
err = -ENOMEM;
goto error;
}
Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
---
drivers/media/pci/cx25821/cx25821-audio-upstream.c | 21 ++---
1 file changed, 6
From: Peter Senna Tschudin peter.se...@gmail.com
The function cx25821_sram_channel_setup_upstream_audio always return zero,
so the return value is not saved any more.
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
A simplified version
Replace kmemdup for kstrdup and cleanup related code.
Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
---
drivers/media/pci/cx25821/cx25821-audio-upstream.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/media/pci/cx25821/cx25821-audio
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
On Mon, Sep 17, 2012 at 11:54 AM, Seungwon Jeon tgih@samsung.com wrote:
On Monday, September 17, 2012, Peter Senna Tschudin peter.se...@gmail.com
wrote:
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
Replace kmalloc+memset for kzalloc and cleanup related code.
To be applied after 47ad3428a1086af425447f763705e06b16ae905d:
[PATCH 5/9] drivers/staging/gdm72xx/gdm_sdio.c: Remove useless kfree
Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
---
drivers/staging/gdm72xx/gdm_sdio.c | 6
As I already applid your first patch, care to just send an incremental
patch that makes the change you did here?
I've just sent a patch for that:
[PATCH] drivers/staging/gdm72xx/gdm_sdio.c: Replace kmalloc+memset for kzalloc
--
Peter
--
To unsubscribe from this list: send the line unsubscribe
Please ignore this patch.
On Fri, Sep 14, 2012 at 5:13 PM, Peter Senna Tschudin
peter.se...@gmail.com wrote:
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
From: Peter Senna Tschudin peter.se...@gmail.com
Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.
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
From: Peter Senna Tschudin
Remove unused label and rename remaining labels
Signed-off-by: Peter Senna Tschudin
---
Depends on patch [v2,7/8] drivers/media/platform/davinci/vpbe.c: Removes
useless kfree() - http://patchwork.linuxtv.org/patch/14307/
drivers/media/platform/davinci/vpbe.c
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
On Thu, Sep 13, 2012 at 4:42 PM, Dan Carpenter wrote:
> On Thu, Sep 13, 2012 at 04:13:07PM +0200, walter harms wrote:
>> > diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
>> > index 5461faa..cbb0521 100644
>> > --- a/drivers/block/aoe/aoecmd.c
>> > +++
On Thu, Sep 13, 2012 at 4:42 PM, Dan Carpenter dan.carpen...@oracle.com wrote:
On Thu, Sep 13, 2012 at 04:13:07PM +0200, walter harms wrote:
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index 5461faa..cbb0521 100644
--- a/drivers/block/aoe/aoecmd.c
+++
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove unused label and rename remaining labels
Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
---
Depends on patch [v2,7/8] drivers/media/platform/davinci/vpbe.c: Removes
useless kfree() - http://patchwork.linuxtv.org/patch/14307
> Seems to me that (assuming kfree(NULL) is ok) the kfree()
> is best left in - just in case some other error path is
> added after drv->cs is assigned.
> Better safe than a memory leak.
I'm not sure if I got your point. Now the label "error:" is only
reached if drv->cs is NULL. There is not
Seems to me that (assuming kfree(NULL) is ok) the kfree()
is best left in - just in case some other error path is
added after drv-cs is assigned.
Better safe than a memory leak.
I'm not sure if I got your point. Now the label error: is only
reached if drv-cs is NULL. There is not other way to
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
drivers/s390/net/ctcm_fsms.c |2 +-
drivers/s390/net/qeth_core_main.c |4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
drivers/sbus/char/display7seg.c |2 +-
drivers/sbus/char/envctrl.c |8
drivers/sbus/char/openprom.c|4 ++--
3 files
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
arch/sparc/kernel/pci_sun4v.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
drivers/scsi/pmcraid.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
drivers/scsi/ibmvscsi/ibmvfc.c | 36 ++--
drivers/scsi/ibmvscsi/ibmvstgt.c |2 +-
drivers/scsi/qlogicpti.c
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
arch/arm/mach-s3c24xx/mach-h1940.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c
b
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
drivers/usb/host/xhci-ring.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
drivers/char/nwbutton.c |4 ++--
drivers/char/rtc.c |2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
fs/notify/inotify/inotify_fsnotify.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/notify/inotify/inotify_fsnotify.c
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
fs/jffs2/wbuf.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index a6597d6..bea0487
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
drivers/usb/misc/rio500.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
drivers/usb/host/sl811-hcd.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
drivers/scsi/bfa/bfa_fcs_lport.c |2 +-
drivers/scsi/bfa/bfa_fcs_rport.c |4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
fs/dlm/rcom.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c
index 9d61947..73d3715 100644
From: Peter Senna Tschudin
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin
---
drivers/rtc/rtc-isl12022.c |2 +-
drivers/rtc/rtc-pcf8563.c |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers
Marcos,
> Now that you removed this kfree, you could remove this label too. Very
> nice your cleanup :)
Thanks!
>
>> vpbe_fail_sd_register:
>> kfree(vpbe_dev->encoders);
>> vpbe_fail_v4l2_device:
The problem removing the label is that it will require some more work
naming the labels.
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
From: Peter Senna Tschudin
Remove useless kfree() and clean up code related to the removal.
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
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
&
I'll split this patch in one patch for file and resend.
On Wed, Sep 12, 2012 at 10:06 AM, Dan Carpenter
dan.carpen...@oracle.com 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
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
From: Peter Senna Tschudin peter.se...@gmail.com
Remove useless kfree() and clean up code related to the removal.
The semantic patch that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// smpl
@r exists@
position p1,p2;
expression x;
@@
if (x@p1 == NULL) { ... kfree@p2(x
Marcos,
Now that you removed this kfree, you could remove this label too. Very
nice your cleanup :)
Thanks!
vpbe_fail_sd_register:
kfree(vpbe_dev-encoders);
vpbe_fail_v4l2_device:
The problem removing the label is that it will require some more work
naming the labels. See:
if
From: Peter Senna Tschudin peter.se...@gmail.com
removes unnecessary semicolon
Found by Coccinelle: http://coccinelle.lip6.fr/
Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com
---
drivers/rtc/rtc-isl12022.c |2 +-
drivers/rtc/rtc-pcf8563.c |2 +-
2 files changed, 2
901 - 1000 of 1112 matches
Mail list logo