Re: [PATCH 9/9] drivers/isdn/gigaset/common.c: Remove useless kfree

2012-09-13 Thread David Miller
From: Tilman Schmidt Date: Thu, 13 Sep 2012 11:52:27 +0200 > Am 12.09.2012 17:06, schrieb Peter Senna Tschudin: >> 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: > [...] >> >>

Re: [PATCH 9/9] drivers/isdn/gigaset/common.c: Remove useless kfree

2012-09-13 Thread Tilman Schmidt
Am 12.09.2012 17:06, schrieb Peter Senna Tschudin: > 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: [...] > > Signed-off-by: Peter Senna Tschudin Acked-by: Tilman Schmidt > --- >

Re: [PATCH 9/9] drivers/isdn/gigaset/common.c: Remove useless kfree

2012-09-13 Thread Peter Senna Tschudin
> 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

Re: [PATCH 9/9] drivers/isdn/gigaset/common.c: Remove useless kfree

2012-09-13 Thread Dan Carpenter
On Thu, Sep 13, 2012 at 09:31:45AM +0100, David Laight wrote: > > Remove useless kfree() and clean up code related to the removal. > ... > > diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c > > index aa41485..30a6b17 100644 > > --- a/drivers/isdn/gigaset/common.c > > +++

RE: [PATCH 9/9] drivers/isdn/gigaset/common.c: Remove useless kfree

2012-09-13 Thread David Laight
> Remove useless kfree() and clean up code related to the removal. ... > diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c > index aa41485..30a6b17 100644 > --- a/drivers/isdn/gigaset/common.c > +++ b/drivers/isdn/gigaset/common.c > @@ -1123,7 +1123,6 @@ struct

RE: [PATCH 9/9] drivers/isdn/gigaset/common.c: Remove useless kfree

2012-09-13 Thread David Laight
Remove useless kfree() and clean up code related to the removal. ... diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index aa41485..30a6b17 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c @@ -1123,7 +1123,6 @@ struct gigaset_driver

Re: [PATCH 9/9] drivers/isdn/gigaset/common.c: Remove useless kfree

2012-09-13 Thread Dan Carpenter
On Thu, Sep 13, 2012 at 09:31:45AM +0100, David Laight wrote: Remove useless kfree() and clean up code related to the removal. ... diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index aa41485..30a6b17 100644 --- a/drivers/isdn/gigaset/common.c +++

Re: [PATCH 9/9] drivers/isdn/gigaset/common.c: Remove useless kfree

2012-09-13 Thread Peter Senna Tschudin
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

Re: [PATCH 9/9] drivers/isdn/gigaset/common.c: Remove useless kfree

2012-09-13 Thread Tilman Schmidt
Am 12.09.2012 17:06, schrieb Peter Senna Tschudin: 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: [...] Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com

Re: [PATCH 9/9] drivers/isdn/gigaset/common.c: Remove useless kfree

2012-09-13 Thread David Miller
From: Tilman Schmidt til...@imap.cc Date: Thu, 13 Sep 2012 11:52:27 +0200 Am 12.09.2012 17:06, schrieb Peter Senna Tschudin: 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