All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cristian Marussi <cristian.marussi@arm.com>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: sudeep.holla@arm.com, Cristian Marussi <cristian.marussi@arm.com>
Subject: [PATCH] firmware: arm_scmi: fix call site of notifications exit
Date: Tue, 12 Jan 2021 19:13:26 +0000	[thread overview]
Message-ID: <20210112191326.29091-1-cristian.marussi@arm.com> (raw)

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


WARNING: multiple messages have this Message-ID (diff)
From: Cristian Marussi <cristian.marussi@arm.com>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Cristian Marussi <cristian.marussi@arm.com>, sudeep.holla@arm.com
Subject: [PATCH] firmware: arm_scmi: fix call site of notifications exit
Date: Tue, 12 Jan 2021 19:13:26 +0000	[thread overview]
Message-ID: <20210112191326.29091-1-cristian.marussi@arm.com> (raw)

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

             reply	other threads:[~2021-01-12 19:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 19:13 Cristian Marussi [this message]
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:22   ` Sudeep Holla
2021-01-13 10:43   ` Cristian Marussi
2021-01-13 10:43     ` Cristian Marussi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210112191326.29091-1-cristian.marussi@arm.com \
    --to=cristian.marussi@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.