* [PATCH] i2c: npcm7xx: barco-p50-gpio: Add check for platform_driver_register
@ 2022-05-26 9:41 ` Jiasheng Jiang
0 siblings, 0 replies; 6+ messages in thread
From: Jiasheng Jiang @ 2022-05-26 9:41 UTC (permalink / raw)
To: avifishman70, tmaimon77, tali.perry1, venture, yuenn, benjaminfair
Cc: openbmc, linux-i2c, linux-kernel, Jiasheng Jiang
As platform_driver_register() could fail, it should be better
to deal with the return value in order to maintain the code
consisitency.
Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
---
drivers/i2c/busses/i2c-npcm7xx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c
index 71aad029425d..08737fa2dcbf 100644
--- a/drivers/i2c/busses/i2c-npcm7xx.c
+++ b/drivers/i2c/busses/i2c-npcm7xx.c
@@ -2336,8 +2336,7 @@ static struct platform_driver npcm_i2c_bus_driver = {
static int __init npcm_i2c_init(void)
{
npcm_i2c_debugfs_dir = debugfs_create_dir("npcm_i2c", NULL);
- platform_driver_register(&npcm_i2c_bus_driver);
- return 0;
+ return platform_driver_register(&npcm_i2c_bus_driver);
}
module_init(npcm_i2c_init);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] i2c: npcm7xx: barco-p50-gpio: Add check for platform_driver_register
@ 2022-05-26 9:41 ` Jiasheng Jiang
0 siblings, 0 replies; 6+ messages in thread
From: Jiasheng Jiang @ 2022-05-26 9:41 UTC (permalink / raw)
To: avifishman70, tmaimon77, tali.perry1, venture, yuenn, benjaminfair
Cc: openbmc, Jiasheng Jiang, linux-i2c, linux-kernel
As platform_driver_register() could fail, it should be better
to deal with the return value in order to maintain the code
consisitency.
Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
---
drivers/i2c/busses/i2c-npcm7xx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c
index 71aad029425d..08737fa2dcbf 100644
--- a/drivers/i2c/busses/i2c-npcm7xx.c
+++ b/drivers/i2c/busses/i2c-npcm7xx.c
@@ -2336,8 +2336,7 @@ static struct platform_driver npcm_i2c_bus_driver = {
static int __init npcm_i2c_init(void)
{
npcm_i2c_debugfs_dir = debugfs_create_dir("npcm_i2c", NULL);
- platform_driver_register(&npcm_i2c_bus_driver);
- return 0;
+ return platform_driver_register(&npcm_i2c_bus_driver);
}
module_init(npcm_i2c_init);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: npcm7xx: barco-p50-gpio: Add check for platform_driver_register
2022-05-26 9:41 ` Jiasheng Jiang
@ 2022-05-26 11:42 ` Tali Perry
-1 siblings, 0 replies; 6+ messages in thread
From: Tali Perry @ 2022-05-26 11:42 UTC (permalink / raw)
To: Jiasheng Jiang
Cc: avifishman70, Tomer Maimon, Patrick Venture, Nancy Yuen,
Benjamin Fair, OpenBMC Maillist, Linux I2C,
Linux Kernel Mailing List
On Thu, May 26, 2022 at 12:41 PM Jiasheng Jiang <jiasheng@iscas.ac.cn> wrote:
>
> As platform_driver_register() could fail, it should be better
> to deal with the return value in order to maintain the code
> consisitency.
>
> Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---
> drivers/i2c/busses/i2c-npcm7xx.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c
> index 71aad029425d..08737fa2dcbf 100644
> --- a/drivers/i2c/busses/i2c-npcm7xx.c
> +++ b/drivers/i2c/busses/i2c-npcm7xx.c
> @@ -2336,8 +2336,7 @@ static struct platform_driver npcm_i2c_bus_driver = {
> static int __init npcm_i2c_init(void)
> {
> npcm_i2c_debugfs_dir = debugfs_create_dir("npcm_i2c", NULL);
> - platform_driver_register(&npcm_i2c_bus_driver);
> - return 0;
> + return platform_driver_register(&npcm_i2c_bus_driver);
> }
> module_init(npcm_i2c_init);
>
> --
> 2.25.1
>
thanks, Jiansheng !
Acked-by: Tali Perry <tali.perry1@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: npcm7xx: barco-p50-gpio: Add check for platform_driver_register
@ 2022-05-26 11:42 ` Tali Perry
0 siblings, 0 replies; 6+ messages in thread
From: Tali Perry @ 2022-05-26 11:42 UTC (permalink / raw)
To: Jiasheng Jiang
Cc: Benjamin Fair, avifishman70, Patrick Venture, OpenBMC Maillist,
Linux Kernel Mailing List, Linux I2C, Tomer Maimon
On Thu, May 26, 2022 at 12:41 PM Jiasheng Jiang <jiasheng@iscas.ac.cn> wrote:
>
> As platform_driver_register() could fail, it should be better
> to deal with the return value in order to maintain the code
> consisitency.
>
> Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
> ---
> drivers/i2c/busses/i2c-npcm7xx.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-npcm7xx.c b/drivers/i2c/busses/i2c-npcm7xx.c
> index 71aad029425d..08737fa2dcbf 100644
> --- a/drivers/i2c/busses/i2c-npcm7xx.c
> +++ b/drivers/i2c/busses/i2c-npcm7xx.c
> @@ -2336,8 +2336,7 @@ static struct platform_driver npcm_i2c_bus_driver = {
> static int __init npcm_i2c_init(void)
> {
> npcm_i2c_debugfs_dir = debugfs_create_dir("npcm_i2c", NULL);
> - platform_driver_register(&npcm_i2c_bus_driver);
> - return 0;
> + return platform_driver_register(&npcm_i2c_bus_driver);
> }
> module_init(npcm_i2c_init);
>
> --
> 2.25.1
>
thanks, Jiansheng !
Acked-by: Tali Perry <tali.perry1@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: npcm7xx: barco-p50-gpio: Add check for platform_driver_register
2022-05-26 9:41 ` Jiasheng Jiang
@ 2022-06-08 20:17 ` Wolfram Sang
-1 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2022-06-08 20:17 UTC (permalink / raw)
To: Jiasheng Jiang
Cc: avifishman70, tmaimon77, tali.perry1, venture, yuenn,
benjaminfair, openbmc, linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
On Thu, May 26, 2022 at 05:41:00PM +0800, Jiasheng Jiang wrote:
> As platform_driver_register() could fail, it should be better
> to deal with the return value in order to maintain the code
> consisitency.
>
> Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Applied to for-current, thanks! But what is with the "barco-p50-gpio:"
in the $subject?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] i2c: npcm7xx: barco-p50-gpio: Add check for platform_driver_register
@ 2022-06-08 20:17 ` Wolfram Sang
0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2022-06-08 20:17 UTC (permalink / raw)
To: Jiasheng Jiang
Cc: benjaminfair, avifishman70, venture, openbmc, linux-kernel,
tali.perry1, linux-i2c, tmaimon77
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
On Thu, May 26, 2022 at 05:41:00PM +0800, Jiasheng Jiang wrote:
> As platform_driver_register() could fail, it should be better
> to deal with the return value in order to maintain the code
> consisitency.
>
> Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver")
> Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Applied to for-current, thanks! But what is with the "barco-p50-gpio:"
in the $subject?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-08 20:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26 9:41 [PATCH] i2c: npcm7xx: barco-p50-gpio: Add check for platform_driver_register Jiasheng Jiang
2022-05-26 9:41 ` Jiasheng Jiang
2022-05-26 11:42 ` Tali Perry
2022-05-26 11:42 ` Tali Perry
2022-06-08 20:17 ` Wolfram Sang
2022-06-08 20:17 ` Wolfram Sang
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.