# VHDL1068: Functions should always return a value ## Summary ```{raw} html
| Reliability | Security | Maintainability | Code attribute | Effort to fix | Tags |
|---|---|---|---|---|---|
| HIGH | - | - | Intentionality | Logical | 20min | synthesis, bug-finder, do254, do254-cp9, linty-ultra |
A function that does not always return a value is likely a coding mistake. All paths of a function should return a value.
function my_function (i : in integer) return std_logic is
begin
if i > 5 then
return '0';
end if;
end;
function my_function (i : in integer) return std_logic is
begin
if i > 5 then
return '0';
else
return '1';
end if;
end;
```
## Parameters
No parameters.
```{raw} html
```