From: Vadim Pasternak <vadimp@mellanox.com>
To: dvhart@infradead.org, andy.shevchenko@gmail.com,
gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org, jiri@resnulli.us,
Vadim Pasternak <vadimp@mellanox.com>
Subject: [PATCH 11/11] platform/x86: mlx-platform: Add hotplug platform driver un-registration for faulty flow
Date: Wed, 31 Jan 2018 21:55:13 +0000 [thread overview]
Message-ID: <1517435713-124919-1-git-send-email-vadimp@mellanox.com> (raw)
Add hotplug platform driver un-registration in case regmap cache
synchronization failed. In such case hotplug platform driver registration
should be rolled back.
Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
---
drivers/platform/x86/mlx-platform.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 2d34aa8..1811451 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -548,10 +548,12 @@ static int __init mlxplat_init(void)
regcache_mark_dirty(mlxplat_hotplug->regmap);
err = regcache_sync(mlxplat_hotplug->regmap);
if (err)
- goto fail_platform_mux_register;
+ goto fail_platform_hotplug_register;
return 0;
+fail_platform_hotplug_register:
+ platform_device_unregister(priv->pdev_hotplug);
fail_platform_mux_register:
while (--i >= 0)
platform_device_unregister(priv->pdev_mux[i]);
--
2.1.4
next reply other threads:[~2018-01-31 21:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 21:55 Vadim Pasternak [this message]
2018-01-31 20:59 ` Darren Hart
2018-01-31 21:02 ` Vadim Pasternak
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=1517435713-124919-1-git-send-email-vadimp@mellanox.com \
--to=vadimp@mellanox.com \
--cc=andy.shevchenko@gmail.com \
--cc=dvhart@infradead.org \
--cc=gregkh@linuxfoundation.org \
--cc=jiri@resnulli.us \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®