powerpc/pseries/vas: Remove the unneeded result variable
authorye xingchen <ye.xingchen@zte.com.cn>
Thu, 25 Aug 2022 07:26:57 +0000 (07:26 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 28 Sep 2022 09:22:14 +0000 (19:22 +1000)
Return the value vas_register_coproc_api() directly instead of storing it
in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220825072657.229168-1-ye.xingchen@zte.com.cn
arch/powerpc/platforms/pseries/vas.c

index 7e6e6dd..46ea4e2 100644 (file)
@@ -501,14 +501,10 @@ static const struct vas_user_win_ops vops_pseries = {
 int vas_register_api_pseries(struct module *mod, enum vas_cop_type cop_type,
                             const char *name)
 {
-       int rc;
-
        if (!copypaste_feat)
                return -ENOTSUPP;
 
-       rc = vas_register_coproc_api(mod, cop_type, name, &vops_pseries);
-
-       return rc;
+       return vas_register_coproc_api(mod, cop_type, name, &vops_pseries);
 }
 EXPORT_SYMBOL_GPL(vas_register_api_pseries);