Skip to content

Commit

Permalink
platform/x86: mlx-platform: Fix error handling in mlxplat_init()
Browse files Browse the repository at this point in the history
Add the missing platform_device_unregister() before return
from mlxplat_init() in the error handling case.

Fixes: 6b266e9 ("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>
  • Loading branch information
Wei Yongjun authored and Andy Shevchenko committed Jul 12, 2019
1 parent b02f6a2 commit e6fbb97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/mlx-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e6fbb97

Please sign in to comment.