From: Ian Abbott Date: Fri, 23 Aug 2013 13:45:05 +0000 (+0100) Subject: staging: comedi: comedi_bond: no need to free dev->private on detach X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c2af5b9681a9d1beaf37310ee3d6a5c4860750d5;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: comedi_bond: no need to free dev->private on detach 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index ab5451ec3480..a2cc28565586 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -355,8 +355,6 @@ static void bonding_detach(struct comedi_device *dev) } kfree(devpriv->devs); devpriv->devs = NULL; - kfree(devpriv); - dev->private = NULL; } }