Module: xenomai-3
Branch: next
Commit: 6a26cd97507be39402a633950786b62b9f1579b1
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=6a26cd97507be39402a633950786b62b9f1579b1

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

cobalt/rtdm: ignore base_minor setting for protocol devices

---

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

diff --git a/kernel/cobalt/rtdm/device.c b/kernel/cobalt/rtdm/device.c
index 6c6299f..6b78fa5 100644
--- a/kernel/cobalt/rtdm/device.c
+++ b/kernel/cobalt/rtdm/device.c
@@ -287,13 +287,13 @@ static int register_driver(struct rtdm_driver *drv)
            drv->device_count >= RTDM_MAX_MINOR)
                return -EINVAL;
 
+       if ((drv->device_flags & RTDM_NAMED_DEVICE) == 0)
+               goto done;
+
        if (drv->base_minor < 0 ||
            drv->base_minor >= RTDM_MAX_MINOR)
                return -EINVAL;
 
-       if ((drv->device_flags & RTDM_NAMED_DEVICE) == 0)
-               goto done;
-
        ret = alloc_chrdev_region(&rdev, drv->base_minor, drv->device_count,
                                  drv->profile_info.name);
        if (ret) {


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

Reply via email to