diff options
| author | Dave Jones <davej@codemonkey.org.uk> | 2002-12-30 22:26:57 +0000 |
|---|---|---|
| committer | Dave Jones <davej@tetrachloride.(none)> | 2002-12-30 22:26:57 +0000 |
| commit | 05ae9880250d5ffe81f9385a83b8d4e73ca5c4c0 (patch) | |
| tree | dacbf68c3d4edc6033aa8a2ea78460dacbb934b1 /drivers | |
| parent | d9d8c4b5f46899661f1eac8ca5093892f38d1bd7 (diff) | |
[AGP] propagate agp_backend_acquire() return code up to the ioctl.
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/char/agp/frontend.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c index c332db2887aa..c8fa165e0595 100644 --- a/drivers/char/agp/frontend.c +++ b/drivers/char/agp/frontend.c @@ -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); |
