linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 11/11] platform/x86: mlx-platform: Add hotplug platform driver un-registration for faulty flow
  2018-01-31 21:55 [PATCH 11/11] platform/x86: mlx-platform: Add hotplug platform driver un-registration for faulty flow Vadim Pasternak
@ 2018-01-31 20:59 ` Darren Hart
  2018-01-31 21:02   ` Vadim Pasternak
  0 siblings, 1 reply; 3+ messages in thread
From: Darren Hart @ 2018-01-31 20:59 UTC (permalink / raw)
  To: Vadim Pasternak
  Cc: andy.shevchenko, gregkh, linux-kernel, platform-driver-x86, jiri

On Wed, Jan 31, 2018 at 09:55:13PM +0000, Vadim Pasternak wrote:
> Add hotplug platform driver un-registration in case regmap cache
> synchronization failed. In such case hotplug platform driver registration
> should be rolled back.

Queued up, thanks Vadim.

-- 
Darren Hart
VMware Open Source Technology Center

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

* RE: [PATCH 11/11] platform/x86: mlx-platform: Add hotplug platform driver un-registration for faulty flow
  2018-01-31 20:59 ` Darren Hart
@ 2018-01-31 21:02   ` Vadim Pasternak
  0 siblings, 0 replies; 3+ messages in thread
From: Vadim Pasternak @ 2018-01-31 21:02 UTC (permalink / raw)
  To: Darren Hart
  Cc: andy.shevchenko, gregkh, linux-kernel, platform-driver-x86, jiri



> -----Original Message-----
> From: Darren Hart [mailto:dvhart@infradead.org]
> Sent: Wednesday, January 31, 2018 11:00 PM
> To: Vadim Pasternak <vadimp@mellanox.com>
> Cc: andy.shevchenko@gmail.com; gregkh@linuxfoundation.org; linux-
> kernel@vger.kernel.org; platform-driver-x86@vger.kernel.org; jiri@resnulli.us
> Subject: Re: [PATCH 11/11] platform/x86: mlx-platform: Add hotplug platform
> driver un-registration for faulty flow
> 
> On Wed, Jan 31, 2018 at 09:55:13PM +0000, Vadim Pasternak wrote:
> > Add hotplug platform driver un-registration in case regmap cache
> > synchronization failed. In such case hotplug platform driver
> > registration should be rolled back.
> 
> Queued up, thanks Vadim.

Thank you.
> 
> --
> Darren Hart
> VMware Open Source Technology Center

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

* [PATCH 11/11] platform/x86: mlx-platform: Add hotplug platform driver un-registration for faulty flow
@ 2018-01-31 21:55 Vadim Pasternak
  2018-01-31 20:59 ` Darren Hart
  0 siblings, 1 reply; 3+ messages in thread
From: Vadim Pasternak @ 2018-01-31 21:55 UTC (permalink / raw)
  To: dvhart, andy.shevchenko, gregkh
  Cc: linux-kernel, platform-driver-x86, jiri, Vadim Pasternak

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

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

end of thread, other threads:[~2018-01-31 21:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-31 21:55 [PATCH 11/11] platform/x86: mlx-platform: Add hotplug platform driver un-registration for faulty flow Vadim Pasternak
2018-01-31 20:59 ` Darren Hart
2018-01-31 21:02   ` Vadim Pasternak

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).