From 82026ea8f23c7b34fe75832846d6422bcfb2450d Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Wed, 14 Feb 2001 02:36:56 +0000 Subject: [PATCH] fixed up postconfig() error handling --- comedi/drivers.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/comedi/drivers.c b/comedi/drivers.c index 2e3da130..952ec035 100644 --- a/comedi/drivers.c +++ b/comedi/drivers.c @@ -144,7 +144,13 @@ attached: /* do a little post-config cleanup */ ret = postconfig(dev); if(ret < 0) + { + driv->detach(dev); + if(dev->subdevices)kfree(dev->subdevices); + if(dev->private)kfree(dev->private); + return ret; + } init_waitqueue_head(&dev->read_wait); init_waitqueue_head(&dev->write_wait); -- 2.26.2