Skip to content

Commit

Permalink
platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init()
Browse files Browse the repository at this point in the history
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: 0378123 ("platform/x86: mlx-platform: Add mlxreg-fan platform driver activation")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Vadim Pasternak <vadimp@mellanox.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  • Loading branch information
Wei Yongjun authored and Andy Shevchenko committed Aug 15, 2018
1 parent 0b4e30f commit 207da71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/platform/x86/mlx-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -1704,8 +1704,8 @@ static int __init mlxplat_init(void)
PLATFORM_DEVID_NONE, NULL, 0,
mlxplat_fan,
sizeof(*mlxplat_fan));
if (IS_ERR(priv->pdev_io_regs)) {
err = PTR_ERR(priv->pdev_io_regs);
if (IS_ERR(priv->pdev_fan)) {
err = PTR_ERR(priv->pdev_fan);
goto fail_platform_io_regs_register;
}
}
Expand Down

0 comments on commit 207da71

Please sign in to comment.