Make use of device_get_agent() in device_request_authentication()
diff --git a/src/device.c b/src/device.c
index 170902e..11b1fd2 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2267,11 +2267,7 @@
 
 	DBG("%s: requesting agent authentication", device->path);
 
-	agent = device->agent;
-
-	if (!agent)
-		agent = adapter_get_agent(device->adapter);
-
+	agent = device_get_agent(device);
 	if (!agent) {
 		error("No agent available for %u request", type);
 		return -EPERM;