Module: xenomai-abe
Branch: analogy
Commit: 30f6b6f4439847f1f9ec01431cbed057eafe5787
URL:    
http://git.xenomai.org/?p=xenomai-abe.git;a=commit;h=30f6b6f4439847f1f9ec01431cbed057eafe5787

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Mon Dec  7 00:12:40 2009 +0100

analogy: properly manage cancel operations on synchronous subdevices

---

 ksrc/drivers/analogy/transfer.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ksrc/drivers/analogy/transfer.c b/ksrc/drivers/analogy/transfer.c
index c6306d9..598cb9e 100644
--- a/ksrc/drivers/analogy/transfer.c
+++ b/ksrc/drivers/analogy/transfer.c
@@ -286,9 +286,10 @@ int a4l_cancel_transfer(a4l_cxt_t * cxt, int idx_subd)
        clear_bit(A4L_TSF_BUSY, &(dev->transfer.status[idx_subd]));
 
        /* If the subdevice is command capable and 
-          if there is a command is under progress, 
+          if a command is under progress, 
           disable it and free it... */
        if (dev->transfer.bufs != NULL &&
+           dev->transfer.bufs[idx_subd] != NULL &&
            dev->transfer.bufs[idx_subd]->cur_cmd != NULL) {
 
                a4l_free_cmddesc(dev->transfer.bufs[idx_subd]->cur_cmd);


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to