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>
This commit is contained in:
committed by
Andy Shevchenko
parent
b02f6a2ef0
commit
e6fbb97da5
@ -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);
|
||||
|
Reference in New Issue
Block a user