Commit 05ae9880 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[AGP] propagate agp_backend_acquire() return code up to the ioctl.

parent d9d8c4b5
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment