Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 06c46978 authored by Frank Rowand's avatar Frank Rowand Committed by Rob Herring
Browse files

of: unittest: remove unneeded local return value variables



A common pattern in many unittest functions is to save the return
value of a function in a local variable, then test the value of
the local variable, without using that return value for any further
purpose.  Remove the local return value variable for these cases.

A second common pattern is:

   ret = some_test_function(many, parameters, ...);
   if (unittest(ret == 0, "error message format", ...))
      return;

This pattern is more clear when the local variable 'ret' is used, due
to the long lines caused by the parameters to the test function and
the long format and data parameters of unittest().  The local
variable is retained in these cases.

Signed-off-by: default avatarFrank Rowand <frank.rowand@sony.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 2a38f6da
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