]> git.hungrycats.org Git - linux/commitdiff
[AGP] propagate agp_backend_acquire() return code up to the ioctl.
authorDave Jones <davej@codemonkey.org.uk>
Mon, 30 Dec 2002 22:26:57 +0000 (22:26 +0000)
committerDave Jones <davej@tetrachloride.(none)>
Mon, 30 Dec 2002 22:26:57 +0000 (22:26 +0000)
drivers/char/agp/frontend.c

index c332db2887aa56e2dd975dcb87d94cd0d31c7245..c8fa165e0595a29605044e0f93ab1051b75db0c7 100644 (file)
@@ -759,18 +759,20 @@ static int agpioc_info_wrap(agp_file_private * priv, unsigned long arg)
 
 static int agpioc_acquire_wrap(agp_file_private * priv, unsigned long arg)
 {
+       int ret;
+
        agp_controller *controller;
-       if (!(test_bit(AGP_FF_ALLOW_CONTROLLER, &priv->access_flags))) {
+       if (!(test_bit(AGP_FF_ALLOW_CONTROLLER, &priv->access_flags)))
                return -EPERM;
-       }
-       if (agp_fe.current_controller != NULL) {
+
+       if (agp_fe.current_controller != NULL)
                return -EBUSY;
-       }
-       if ((agp_backend_acquire()) == 0) {
+
+       ret = agp_backend_acquire();
+       if (ret == 0)
                agp_fe.backend_acquired = TRUE;
-       } else {
-               return -EBUSY;
-       }
+       else
+               return ret;
 
        controller = agp_find_controller_by_pid(priv->my_pid);