service: rpmsg_rpc: fix build error

The if (&rpc->ept) comparison will always evaluate as 'true',
since rpc == &rpc->ept and rpc is previously checked to be valid.

This produces an error when building open-amp with gcc >= 13.

Signed-off-by: Dan Milea <dan.milea@windriver.com>
This commit is contained in:
Dan Milea
2023-11-21 09:24:43 +01:00
committed by Arnaud Pouliquen
parent 78043fa8b2
commit cce796dff4
+1 -2
View File
@@ -81,8 +81,7 @@ void rpmsg_rpc_client_release(struct rpmsg_rpc_clt *rpc)
{
if (!rpc)
return;
if (&rpc->ept)
rpmsg_destroy_ept(&rpc->ept);
rpmsg_destroy_ept(&rpc->ept);
}