firmware: arm_scmi: fix call site of notifications exit

Started by Cristian Marussi on Jan 12, 2021 · 3 messages from 2 authors · Last reply Jan 13, 2021

Subsystems (2)

Maintainers (2)

STALE2145d LANDED

Status: Landed in mainline as a90b6543bf06 on 2021-01-13.

open the first message on its own page

Message details and related content
Call scmi_notification_exit() only when SCMI platform driver instance has
been really successfully removed.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
A small fix spotted by code inspection, applies on for-next/scmi
n top of:

commit 6054d97ab512 ("MAINTAINERS: Update ARM SCMI entry")
---
 drivers/firmware/arm_scmi/driver.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 5392e1fc6b4e..dd65fb1c453c 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -848,13 +848,13 @@ static int scmi_remove(struct platform_device *pdev)
 	struct scmi_info *info = platform_get_drvdata(pdev);
 	struct idr *idr = &info->tx_idr;
 
-	scmi_notification_exit(&info->handle);
-
 	mutex_lock(&scmi_list_mutex);
-	if (info->users)
+	if (info->users) {
 		ret = -EBUSY;
-	else
+	} else {
+		scmi_notification_exit(&info->handle);
 		list_del(&info->node);
+	}
 	mutex_unlock(&scmi_list_mutex);
 
 	if (ret)
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Message details and related content
On Tue, Jan 12, 2021 at 07:13:26PM +0000, Cristian Marussi wrote:
Call scmi_notification_exit() only when SCMI platform driver instance has
been really successfully removed.
Doesn't this deserve Fixes tag BTW ? Just send the tag if required, I can
fold it in.

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Message details and related content
On Wed, Jan 13, 2021 at 10:22:54AM +0000, Sudeep Holla wrote:
On Tue, Jan 12, 2021 at 07:13:26PM +0000, Cristian Marussi wrote:
quoted
Call scmi_notification_exit() only when SCMI platform driver instance has
been really successfully removed.
Doesn't this deserve Fixes tag BTW ? Just send the tag if required, I can
fold it in.
Yes, sorry

Fixes: 6b8a69131dc63 ("firmware: arm_scmi: Enable notification core")

Thanks

Cristian
-- 
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help