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: 6b266e91a0 ("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>
This commit is contained in:
Wei Yongjun 2019-07-09 01:38:42 +00:00 committed by Andy Shevchenko
parent b02f6a2ef0
commit e6fbb97da5
1 changed files with 1 additions and 1 deletions

View File

@ -2111,7 +2111,7 @@ static int __init mlxplat_init(void)
mlxplat_regmap_config);
if (IS_ERR(priv->regmap)) {
err = PTR_ERR(priv->regmap);
return err;
goto fail_alloc;
}
err = mlxplat_mlxcpld_verify_bus_topology(&nr);