diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2019-07-08 21:38:42 -0400 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-07-12 09:00:38 -0400 |
commit | e6fbb97da5212ceab7149896832d35fa1ab02f34 (patch) | |
tree | 0c8fc8f7abe0c9b0880f0eb0102d8978fa91d715 /drivers/platform/x86/mlx-platform.c | |
parent | b02f6a2ef0a14af5c19780521370673f55c1476d (diff) |
platform/x86: mlx-platform: Fix error handling in mlxplat_init()
Add the missing platform_device_unregister() before return
from mlxplat_init() in the error handling case.
Fixes: 6b266e91a071 ("platform/x86: mlx-platform: Move regmap initialization before all drivers activation")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86/mlx-platform.c')
-rw-r--r-- | drivers/platform/x86/mlx-platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c index 2b98f299faa4..8fe51e43f1bc 100644 --- a/drivers/platform/x86/mlx-platform.c +++ b/drivers/platform/x86/mlx-platform.c | |||
@@ -2111,7 +2111,7 @@ static int __init mlxplat_init(void) | |||
2111 | mlxplat_regmap_config); | 2111 | mlxplat_regmap_config); |
2112 | if (IS_ERR(priv->regmap)) { | 2112 | if (IS_ERR(priv->regmap)) { |
2113 | err = PTR_ERR(priv->regmap); | 2113 | err = PTR_ERR(priv->regmap); |
2114 | return err; | 2114 | goto fail_alloc; |
2115 | } | 2115 | } |
2116 | 2116 | ||
2117 | err = mlxplat_mlxcpld_verify_bus_topology(&nr); | 2117 | err = mlxplat_mlxcpld_verify_bus_topology(&nr); |