Skip to content
  • Frank Rowand's avatar
    of: unittest: remove unneeded local return value variables · 06c46978
    Frank Rowand authored
    
    
    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>
    06c46978