diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-08-08 00:00:30 -0400 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-08-15 05:55:32 -0400 |
commit | 207da7128a6d61a1ce3d052b3dfb10d237af6078 (patch) | |
tree | 8e41ac7ad88d8f0d971b854d6d33c971bcf03905 | |
parent | 0b4e30f49aa44725cbaefa6e839bd82a768c385a (diff) |
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: 0378123c5800 ("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>
-rw-r--r-- | drivers/platform/x86/mlx-platform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c index e1f9fce479fc..d89936c93ba0 100644 --- a/drivers/platform/x86/mlx-platform.c +++ b/drivers/platform/x86/mlx-platform.c | |||
@@ -1704,8 +1704,8 @@ static int __init mlxplat_init(void) | |||
1704 | PLATFORM_DEVID_NONE, NULL, 0, | 1704 | PLATFORM_DEVID_NONE, NULL, 0, |
1705 | mlxplat_fan, | 1705 | mlxplat_fan, |
1706 | sizeof(*mlxplat_fan)); | 1706 | sizeof(*mlxplat_fan)); |
1707 | if (IS_ERR(priv->pdev_io_regs)) { | 1707 | if (IS_ERR(priv->pdev_fan)) { |
1708 | err = PTR_ERR(priv->pdev_io_regs); | 1708 | err = PTR_ERR(priv->pdev_fan); |
1709 | goto fail_platform_io_regs_register; | 1709 | goto fail_platform_io_regs_register; |
1710 | } | 1710 | } |
1711 | } | 1711 | } |