From: Wei Yongjun Date: Wed, 8 Aug 2018 04:00:30 +0000 (+0000) Subject: platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init() X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~4676^2~8 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=207da7128a6d61a1ce3d052b3dfb10d237af6078;p=mirror_ubuntu-focal-kernel.git 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 Acked-by: Vadim Pasternak Signed-off-by: Andy Shevchenko --- 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) 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; } }