summaryrefslogtreecommitdiffstats
path: root/drivers/rpmsg/qcom_glink_native.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rpmsg/qcom_glink_native.c')
-rw-r--r--drivers/rpmsg/qcom_glink_native.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 196ca7d8df7c..916c0dbe4213 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -1371,8 +1371,9 @@ static int __qcom_glink_send(struct glink_channel *channel,
ret = qcom_glink_tx(glink, &req, sizeof(req), data, chunk_size, wait);
/* Mark intent available if we failed */
- if (ret && intent) {
- intent->in_use = false;
+ if (ret) {
+ if (intent)
+ intent->in_use = false;
return ret;
}
@@ -1393,8 +1394,9 @@ static int __qcom_glink_send(struct glink_channel *channel,
chunk_size, wait);
/* Mark intent available if we failed */
- if (ret && intent) {
- intent->in_use = false;
+ if (ret) {
+ if (intent)
+ intent->in_use = false;
break;
}
}