Why is this an issue?

Functions should only contain one single return statement.

How to fix it

Code examples

Noncompliant code example

function my_function(z : boolean) return std_logic is
begin
  if z then
    return '1'; 
  else
    return '0';
  end if;
end;

Compliant Code Example

function my_function(z : boolean) return std_logic is
  variable tmp : std_logic;
begin
  if z then
    tmp := '1';
  else
    tmp := '0';
  end if;
  return tmp;  -- Compliant
end;