Module: xenomai-3
Branch: wip/dovetail
Commit: 2ee27dcd5ff5501b7cf550680379e0319e5836c9
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=2ee27dcd5ff5501b7cf550680379e0319e5836c9

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Jun 15 10:51:45 2016 +0200

cobalt/rtdm: fix off-by-one error in device_count check

---

 kernel/cobalt/rtdm/device.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cobalt/rtdm/device.c b/kernel/cobalt/rtdm/device.c
index 6b78fa5..07ad1a6 100644
--- a/kernel/cobalt/rtdm/device.c
+++ b/kernel/cobalt/rtdm/device.c
@@ -284,7 +284,7 @@ static int register_driver(struct rtdm_driver *drv)
        }
 
        if (drv->device_count <= 0 ||
-           drv->device_count >= RTDM_MAX_MINOR)
+           drv->device_count > RTDM_MAX_MINOR)
                return -EINVAL;
 
        if ((drv->device_flags & RTDM_NAMED_DEVICE) == 0)


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

Reply via email to