Skip to content
Commit 5b45a753 authored by Javier Carrasco's avatar Javier Carrasco Committed by Shuah Khan
Browse files

selftests: uevent filtering: fix return on error in uevent_listener



The ret variable is used to check function return values and assigning
values to it on error has no effect as it is an unused value.

The current implementation uses an additional variable (fret) to return
the error value, which in this case is unnecessary and lead to the above
described misuse. There is no restriction in the current implementation
to always return -1 on error and the actual negative error value can be
returned safely without storing -1 in a specific variable.

Simplify the error checking by using a single variable which always
holds the returned value.

Signed-off-by: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 37013b55
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment