Skip to contentSkip to conversation

Staging: comedi: fix bracing and kfree issue in ni_670x.c This is a patch to the ni_670x.c file that fixes up brace and kfree issue found by checkpatch.pl tool Signed-off-by: Graham M Howe<[email protected]>

PATCH In review Graham M Howe 2 participants 2 messages Feb 20, 2010 – Feb 26, 2010 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 5/5 Staging: comedi: fix bracing and kfree issue in ni_670x.c This is a patch to the ni_670x.c file that fixes up brace and kfree issue found by checkpatch.pl tool Signed-off-by: Graham M Howe<[email protected]>

---
 drivers/staging/comedi/drivers/ni_670x.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/ni_670x.c +0 -2
index fc5f90f..352b917 100644
@@ -221,8 +221,6 @@ static int ni_670x_detach(struct comedi_device *dev)
 {
 	printk("comedi%d: ni_670x: remove\n", dev->minor);
 
-	if (dev->subdevices[0].range_table_list)
-		kfree(dev->subdevices[0].range_table_list);
 
 	if (dev->private && devpriv->mite)
 		mite_unsetup(devpriv->mite);

--
1.6.3.3

#1 lore raw

The subject doesn't match what the patch did :(

Quoted 9 lines · Graham M Howe
---
 drivers/staging/comedi/drivers/ni_670x.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/ni_670x.c +0 -0
index fc5f90f..352b917 100644

drivers/staging/comedi/drivers/ni_670x.c static int ni_670x_detach(struct comedi_device *dev) · line 225

Quoted 5 lines
drivers/staging/comedi/drivers/ni_670x.c +0 -2
@@ -221,8 +221,6 @@ static int ni_670x_detach(struct comedi_device *dev)
 {
 	printk("comedi%d: ni_670x: remove\n", dev->minor);
 
-	if (dev->subdevices[0].range_table_list)
-		kfree(dev->subdevices[0].range_table_list);

You can't just not free the memory :(

greg k-h