提交 207da712 编写于 作者: W Wei Yongjun 提交者: Andy Shevchenko

platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init()

The return value from platform_device_register_resndata() is not checked
correctly. The test is done against a wrong variable. This patch fix it.

Fixes: 0378123c ("platform/x86: mlx-platform: Add mlxreg-fan platform driver activation")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Acked-by: NVadim Pasternak <vadimp@mellanox.com>
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
上级 0b4e30f4
...@@ -1704,8 +1704,8 @@ static int __init mlxplat_init(void) ...@@ -1704,8 +1704,8 @@ static int __init mlxplat_init(void)
PLATFORM_DEVID_NONE, NULL, 0, PLATFORM_DEVID_NONE, NULL, 0,
mlxplat_fan, mlxplat_fan,
sizeof(*mlxplat_fan)); sizeof(*mlxplat_fan));
if (IS_ERR(priv->pdev_io_regs)) { if (IS_ERR(priv->pdev_fan)) {
err = PTR_ERR(priv->pdev_io_regs); err = PTR_ERR(priv->pdev_fan);
goto fail_platform_io_regs_register; goto fail_platform_io_regs_register;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册