Skip to contentSkip to conversation

greybus/operation: Drop reference when message has been set

PATCH Superseded Lv Yunlong 2 participants 3 messages Mar 10, 2021 Greybus

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Lv Yunlong

author
#0 lore raw

PATCH 1/1 greybus/operation: Drop reference when message has been set

In gb_operation_response_send, get an extra reference before gb_message_send() with this comment "/* Reference will be dropped when message has been sent. */". Therefore, we should drop the got reference not only in the error branch, but also in the complete branch.

---
 drivers/greybus/operation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/greybus/operation.c +1 -1
index 296f0b93d171..500b3fe53a04 100644
@@ -855,7 +855,7 @@ static int gb_operation_response_send(struct gb_operation *operation,
 	if (ret)
 		goto err_put_active;
 
-	/*Drop reference after message send successfully. */
+	/*Drop reference after message send completes. */
 	gb_operation_put_active(operation);
 	gb_operation_put(operation);
 
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 5 lines · Lv Yunlong

In gb_operation_response_send, get an extra reference before gb_message_send() with this comment "/* Reference will be dropped when message has been sent. */". Therefore, we should drop the got reference not only in the error branch, but also in the complete branch.

That's not what your patch does at all :(

#2 lore raw

Sorry, i mistakenly divided the patch into two commits. What i have sent is the latest commit which corrected my grammar in the patch.

I will send the full patch soon.

Quoted 16 lines

-----原始邮件-----
发件人: "Greg KH" <[email protected]>
发送时间: 2021-03-10 17:32:40 (星期三)
收件人: "Lv Yunlong" <[email protected]>
抄送: [email protected], [email protected], [email protected], [email protected] 主题: Re: [PATCH] greybus/operation: Drop reference when message has been set

Quoted 5 lines · Lv Yunlong

In gb_operation_response_send, get an extra reference before gb_message_send() with this comment "/* Reference will be dropped when message has been sent. */". Therefore, we should drop the got reference not only in the error branch, but also in the complete branch.

That's not what your patch does at all :(