staging: comedi: comedi_bond: no need to free dev->private on detach
authorIan Abbott <abbotti@mev.co.uk>
Fri, 23 Aug 2013 13:45:05 +0000 (14:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Aug 2013 13:41:56 +0000 (06:41 -0700)
The comedi core will free `dev->private` if it is non-NULL after calling
the "detach" handler (`bonding_detach()`), so don't bother freeing it in
`bonding_detach()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/comedi_bond.c

index ab5451ec3480c141cd86a0ded03a8eda97690c8b..a2cc28565586e50d7f351a1ac3c020d351b3d202 100644 (file)
@@ -355,8 +355,6 @@ static void bonding_detach(struct comedi_device *dev)
                }
                kfree(devpriv->devs);
                devpriv->devs = NULL;
-               kfree(devpriv);
-               dev->private = NULL;
        }
 }