Refactor `get_output_location` method in AthenaHook
diff --git a/airflow/providers/amazon/aws/hooks/athena.py b/airflow/providers/amazon/aws/hooks/athena.py
index c8af86ee3a183..3715b4a1bc2c2 100644
--- a/airflow/providers/amazon/aws/hooks/athena.py
+++ b/airflow/providers/amazon/aws/hooks/athena.py
@@ -292,13 +292,12 @@ def get_output_location(self, query_execution_id: str) -> str:
 
         :param query_execution_id: Id of submitted athena query
         """
-        output_location = None
         if query_execution_id:
             response = self.get_query_info(query_execution_id=query_execution_id, use_cache=True)
 
             if response:
                 try:
-                    output_location = response["QueryExecution"]["ResultConfiguration"]["OutputLocation"]
+                    return response["QueryExecution"]["ResultConfiguration"]["OutputLocation"]
                 except KeyError:
                     self.log.error(
                         "Error retrieving OutputLocation. Query execution id: %s", query_execution_id
@@ -306,10 +305,7 @@ def get_output_location(self, query_execution_id: str) -> str:
                     raise
             else:
                 raise
-        else:
-            raise ValueError("Invalid Query execution id. Query execution id: %s", query_execution_id)
-
-        return output_location
+        raise ValueError("Invalid Query execution id. Query execution id: %s", query_execution_id)
 
     def stop_query(self, query_execution_id: str) -> dict:
         """Cancel the submitted query.
