* [PATCH -next] platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init()
@ 2018-08-08 3:53 Wei Yongjun
2018-08-08 3:56 ` Vadim Pasternak
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Wei Yongjun @ 2018-08-08 3:53 UTC (permalink / raw)
To: kernel-janitors
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>
---
drivers/platform/x86/mlx-platform.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index e1f9fce..d89936c 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;
}
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH -next] platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init()
2018-08-08 3:53 [PATCH -next] platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init() Wei Yongjun
@ 2018-08-08 3:56 ` Vadim Pasternak
2018-08-15 9:54 ` Andy Shevchenko
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Vadim Pasternak @ 2018-08-08 3:56 UTC (permalink / raw)
To: kernel-janitors
> -----Original Message-----
> From: Wei Yongjun <weiyongjun1@huawei.com>
> Sent: Wednesday, August 08, 2018 7:01 AM
> To: Vadim Pasternak <vadimp@mellanox.com>; Darren Hart
> <dvhart@infradead.org>; Andy Shevchenko <andy@infradead.org>
> Cc: Wei Yongjun <weiyongjun1@huawei.com>; platform-driver-
> x86@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [PATCH -next] 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>
> ---
> drivers/platform/x86/mlx-platform.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-
> platform.c
> index e1f9fce..d89936c 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;
> }
> }
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH -next] platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init()
2018-08-08 3:53 [PATCH -next] platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init() Wei Yongjun
2018-08-08 3:56 ` Vadim Pasternak
@ 2018-08-15 9:54 ` Andy Shevchenko
2019-07-09 1:38 ` [PATCH -next] platform/x86: mlx-platform: Fix error handling " Wei Yongjun
2019-07-12 13:07 ` Andy Shevchenko
3 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2018-08-15 9:54 UTC (permalink / raw)
To: kernel-janitors
On Wed, Aug 8, 2018 at 6:56 AM, Vadim Pasternak <vadimp@mellanox.com> wrote:
>
>
>> -----Original Message-----
>> From: Wei Yongjun <weiyongjun1@huawei.com>
>> Sent: Wednesday, August 08, 2018 7:01 AM
>> To: Vadim Pasternak <vadimp@mellanox.com>; Darren Hart
>> <dvhart@infradead.org>; Andy Shevchenko <andy@infradead.org>
>> Cc: Wei Yongjun <weiyongjun1@huawei.com>; platform-driver-
>> x86@vger.kernel.org; kernel-janitors@vger.kernel.org
>> Subject: [PATCH -next] 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>
>
Pushed to my review and testing queue, thanks!
> Acked-by: Vadim Pasternak <vadimp@mellanox.com>
>
>> ---
>> drivers/platform/x86/mlx-platform.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-
>> platform.c
>> index e1f9fce..d89936c 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;
>> }
>> }
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH -next] platform/x86: mlx-platform: Fix error handling in mlxplat_init()
2018-08-08 3:53 [PATCH -next] platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init() Wei Yongjun
2018-08-08 3:56 ` Vadim Pasternak
2018-08-15 9:54 ` Andy Shevchenko
@ 2019-07-09 1:38 ` Wei Yongjun
2019-07-12 13:07 ` Andy Shevchenko
3 siblings, 0 replies; 5+ messages in thread
From: Wei Yongjun @ 2019-07-09 1:38 UTC (permalink / raw)
To: kernel-janitors
Add the missing platform_device_unregister() before return
from mlxplat_init() in the error handling case.
Fixes: 6b266e91a071 ("platform/x86: mlx-platform: Move regmap initialization before all drivers activation")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/platform/x86/mlx-platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 2b98f299faa4..8fe51e43f1bc 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -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);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH -next] platform/x86: mlx-platform: Fix error handling in mlxplat_init()
2018-08-08 3:53 [PATCH -next] platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init() Wei Yongjun
` (2 preceding siblings ...)
2019-07-09 1:38 ` [PATCH -next] platform/x86: mlx-platform: Fix error handling " Wei Yongjun
@ 2019-07-12 13:07 ` Andy Shevchenko
3 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2019-07-12 13:07 UTC (permalink / raw)
To: kernel-janitors
On Tue, Jul 9, 2019 at 4:32 AM Wei Yongjun <weiyongjun1@huawei.com> wrote:
>
> Add the missing platform_device_unregister() before return
> from mlxplat_init() in the error handling case.
>
Applied, thanks!
> Fixes: 6b266e91a071 ("platform/x86: mlx-platform: Move regmap initialization before all drivers activation")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> drivers/platform/x86/mlx-platform.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
> index 2b98f299faa4..8fe51e43f1bc 100644
> --- a/drivers/platform/x86/mlx-platform.c
> +++ b/drivers/platform/x86/mlx-platform.c
> @@ -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);
>
>
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-07-12 13:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 3:53 [PATCH -next] platform/x86: mlx-platform: Fix copy-paste error in mlxplat_init() Wei Yongjun
2018-08-08 3:56 ` Vadim Pasternak
2018-08-15 9:54 ` Andy Shevchenko
2019-07-09 1:38 ` [PATCH -next] platform/x86: mlx-platform: Fix error handling " Wei Yongjun
2019-07-12 13:07 ` Andy Shevchenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.