Module: xenomai-forge
Branch: next
Commit: 456883d1ce5eb8f5ff9c458f7e0231801a4d6d78
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=456883d1ce5eb8f5ff9c458f7e0231801a4d6d78

Author: Jorge Ramirez-Ortiz <j...@xenomai.org>
Date:   Fri Aug 15 16:23:08 2014 -0400

drivers/analogy: fix detach logic

---

 kernel/drivers/analogy/device.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/drivers/analogy/device.c b/kernel/drivers/analogy/device.c
index 63104e5..160dcf5 100644
--- a/kernel/drivers/analogy/device.c
+++ b/kernel/drivers/analogy/device.c
@@ -394,13 +394,13 @@ int a4l_ioctl_devcfg(struct a4l_device_context * cxt, 
void *arg)
                        return ret;
                /* Remove the related proc file */
                a4l_proc_detach(cxt);
-               /* Free the transfer structure and its related data */
-               if ((ret = a4l_cleanup_transfer(cxt)) != 0)
-                       return ret;
                /* Free the device and the driver from each other */
                if ((ret = a4l_device_detach(cxt)) == 0)
                        clear_bit(A4L_DEV_ATTACHED_NR,
                                  &(a4l_get_dev(cxt)->flags));
+               /* Free the transfer structure and its related data */
+               if ((ret = a4l_cleanup_transfer(cxt)) != 0)
+                       return ret;
        } else {
                /* Basic checking */
                if (test_bit


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to