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

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Sun Jan 24 23:22:56 2010 +0100

analogy: print a kernel error message if an instruction failed

---

 ksrc/drivers/analogy/instruction.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ksrc/drivers/analogy/instruction.c 
b/ksrc/drivers/analogy/instruction.c
index 0bb1c18..f3a4ed7 100644
--- a/ksrc/drivers/analogy/instruction.c
+++ b/ksrc/drivers/analogy/instruction.c
@@ -196,9 +196,14 @@ int a4l_do_special_insn(a4l_cxt_t * cxt, a4l_kinsn_t * dsc)
        default:
                __a4l_err("a4l_do_special_insn: "
                          "incoherent instruction code\n");
-               ret = -EINVAL;
+               return -EINVAL;
        }
 
+       if (ret < 0) 
+               __a4l_err("a4l_do_special_insn: "
+                         "execution of the instruction failed (err=%d)\n",
+                         ret);
+
        return ret;
 }
 
@@ -268,6 +273,11 @@ int a4l_do_insn(a4l_cxt_t * cxt, a4l_kinsn_t * dsc)
        /* Let's the driver-specific code perform the instruction */
        ret = hdlr(subd, dsc);
 
+       if (ret < 0) 
+               __a4l_err("a4l_do_insn: "
+                         "execution of the instruction failed (err=%d)\n",
+                         ret);
+
 out_do_insn:
 
        /* Releases the subdevice from its reserved state */


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

Reply via email to