linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] firmware: arm_scmi: fix call site of notifications exit
@ 2021-01-12 19:13 Cristian Marussi
  2021-01-13 10:22 ` Sudeep Holla
  0 siblings, 1 reply; 3+ messages in thread
From: Cristian Marussi @ 2021-01-12 19:13 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel; +Cc: sudeep.holla, Cristian Marussi

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] firmware: arm_scmi: fix call site of notifications exit
  2021-01-12 19:13 [PATCH] firmware: arm_scmi: fix call site of notifications exit Cristian Marussi
@ 2021-01-13 10:22 ` Sudeep Holla
  2021-01-13 10:43   ` Cristian Marussi
  0 siblings, 1 reply; 3+ messages in thread
From: Sudeep Holla @ 2021-01-13 10:22 UTC (permalink / raw)
  To: Cristian Marussi; +Cc: linux-kernel, linux-arm-kernel, Sudeep Holla

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] firmware: arm_scmi: fix call site of notifications exit
  2021-01-13 10:22 ` Sudeep Holla
@ 2021-01-13 10:43   ` Cristian Marussi
  0 siblings, 0 replies; 3+ messages in thread
From: Cristian Marussi @ 2021-01-13 10:43 UTC (permalink / raw)
  To: Sudeep Holla; +Cc: linux-kernel, linux-arm-kernel

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:
> > 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-13 10:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 19:13 [PATCH] firmware: arm_scmi: fix call site of notifications exit Cristian Marussi
2021-01-13 10:22 ` Sudeep Holla
2021-01-13 10:43   ` Cristian Marussi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).