All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_probe()
@ 2017-12-27 21:39 ` SF Markus Elfring
  0 siblings, 0 replies; 9+ messages in thread
From: SF Markus Elfring @ 2017-12-27 21:39 UTC (permalink / raw)
  To: linux-gpio, linux-arm-kernel, Linus Walleij, Viresh Kumar
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 27 Dec 2017 22:34:28 +0100

Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/pinctrl/spear/pinctrl-plgpio.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
index 6a0ed8ab33b9..d2123e396b29 100644
--- a/drivers/pinctrl/spear/pinctrl-plgpio.c
+++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
@@ -519,10 +519,8 @@ static int plgpio_probe(struct platform_device *pdev)
 	int ret, irq;
 
 	plgpio = devm_kzalloc(&pdev->dev, sizeof(*plgpio), GFP_KERNEL);
-	if (!plgpio) {
-		dev_err(&pdev->dev, "memory allocation fail\n");
+	if (!plgpio)
 		return -ENOMEM;
-	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	plgpio->base = devm_ioremap_resource(&pdev->dev, res);
@@ -544,10 +542,8 @@ static int plgpio_probe(struct platform_device *pdev)
 			sizeof(*plgpio->csave_regs) *
 			DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG),
 			GFP_KERNEL);
-	if (!plgpio->csave_regs) {
-		dev_err(&pdev->dev, "csave registers memory allocation fail\n");
+	if (!plgpio->csave_regs)
 		return -ENOMEM;
-	}
 #endif
 
 	platform_set_drvdata(pdev, plgpio);
-- 
2.15.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_pro
@ 2017-12-27 21:39 ` SF Markus Elfring
  0 siblings, 0 replies; 9+ messages in thread
From: SF Markus Elfring @ 2017-12-27 21:39 UTC (permalink / raw)
  To: linux-arm-kernel

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 27 Dec 2017 22:34:28 +0100

Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/pinctrl/spear/pinctrl-plgpio.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
index 6a0ed8ab33b9..d2123e396b29 100644
--- a/drivers/pinctrl/spear/pinctrl-plgpio.c
+++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
@@ -519,10 +519,8 @@ static int plgpio_probe(struct platform_device *pdev)
 	int ret, irq;
 
 	plgpio = devm_kzalloc(&pdev->dev, sizeof(*plgpio), GFP_KERNEL);
-	if (!plgpio) {
-		dev_err(&pdev->dev, "memory allocation fail\n");
+	if (!plgpio)
 		return -ENOMEM;
-	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	plgpio->base = devm_ioremap_resource(&pdev->dev, res);
@@ -544,10 +542,8 @@ static int plgpio_probe(struct platform_device *pdev)
 			sizeof(*plgpio->csave_regs) *
 			DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG),
 			GFP_KERNEL);
-	if (!plgpio->csave_regs) {
-		dev_err(&pdev->dev, "csave registers memory allocation fail\n");
+	if (!plgpio->csave_regs)
 		return -ENOMEM;
-	}
 #endif
 
 	platform_set_drvdata(pdev, plgpio);
-- 
2.15.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_probe()
@ 2017-12-27 21:39 ` SF Markus Elfring
  0 siblings, 0 replies; 9+ messages in thread
From: SF Markus Elfring @ 2017-12-27 21:39 UTC (permalink / raw)
  To: linux-arm-kernel

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 27 Dec 2017 22:34:28 +0100

Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/pinctrl/spear/pinctrl-plgpio.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
index 6a0ed8ab33b9..d2123e396b29 100644
--- a/drivers/pinctrl/spear/pinctrl-plgpio.c
+++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
@@ -519,10 +519,8 @@ static int plgpio_probe(struct platform_device *pdev)
 	int ret, irq;
 
 	plgpio = devm_kzalloc(&pdev->dev, sizeof(*plgpio), GFP_KERNEL);
-	if (!plgpio) {
-		dev_err(&pdev->dev, "memory allocation fail\n");
+	if (!plgpio)
 		return -ENOMEM;
-	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	plgpio->base = devm_ioremap_resource(&pdev->dev, res);
@@ -544,10 +542,8 @@ static int plgpio_probe(struct platform_device *pdev)
 			sizeof(*plgpio->csave_regs) *
 			DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG),
 			GFP_KERNEL);
-	if (!plgpio->csave_regs) {
-		dev_err(&pdev->dev, "csave registers memory allocation fail\n");
+	if (!plgpio->csave_regs)
 		return -ENOMEM;
-	}
 #endif
 
 	platform_set_drvdata(pdev, plgpio);
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_probe()
  2017-12-27 21:39 ` [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_pro SF Markus Elfring
  (?)
@ 2017-12-28  5:26   ` Viresh Kumar
  -1 siblings, 0 replies; 9+ messages in thread
From: Viresh Kumar @ 2017-12-28  5:26 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-gpio, linux-arm-kernel, Linus Walleij, Viresh Kumar, LKML,
	kernel-janitors

On 27-12-17, 22:39, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Dec 2017 22:34:28 +0100
> 
> Omit extra messages for a memory allocation failure in this function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/pinctrl/spear/pinctrl-plgpio.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
> index 6a0ed8ab33b9..d2123e396b29 100644
> --- a/drivers/pinctrl/spear/pinctrl-plgpio.c
> +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
> @@ -519,10 +519,8 @@ static int plgpio_probe(struct platform_device *pdev)
>  	int ret, irq;
>  
>  	plgpio = devm_kzalloc(&pdev->dev, sizeof(*plgpio), GFP_KERNEL);
> -	if (!plgpio) {
> -		dev_err(&pdev->dev, "memory allocation fail\n");
> +	if (!plgpio)
>  		return -ENOMEM;
> -	}
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	plgpio->base = devm_ioremap_resource(&pdev->dev, res);
> @@ -544,10 +542,8 @@ static int plgpio_probe(struct platform_device *pdev)
>  			sizeof(*plgpio->csave_regs) *
>  			DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG),
>  			GFP_KERNEL);
> -	if (!plgpio->csave_regs) {
> -		dev_err(&pdev->dev, "csave registers memory allocation fail\n");
> +	if (!plgpio->csave_regs)
>  		return -ENOMEM;
> -	}
>  #endif
>  
>  	platform_set_drvdata(pdev, plgpio);

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_probe()
@ 2017-12-28  5:26   ` Viresh Kumar
  0 siblings, 0 replies; 9+ messages in thread
From: Viresh Kumar @ 2017-12-28  5:26 UTC (permalink / raw)
  To: linux-arm-kernel

On 27-12-17, 22:39, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Dec 2017 22:34:28 +0100
> 
> Omit extra messages for a memory allocation failure in this function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/pinctrl/spear/pinctrl-plgpio.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
> index 6a0ed8ab33b9..d2123e396b29 100644
> --- a/drivers/pinctrl/spear/pinctrl-plgpio.c
> +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
> @@ -519,10 +519,8 @@ static int plgpio_probe(struct platform_device *pdev)
>  	int ret, irq;
>  
>  	plgpio = devm_kzalloc(&pdev->dev, sizeof(*plgpio), GFP_KERNEL);
> -	if (!plgpio) {
> -		dev_err(&pdev->dev, "memory allocation fail\n");
> +	if (!plgpio)
>  		return -ENOMEM;
> -	}
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	plgpio->base = devm_ioremap_resource(&pdev->dev, res);
> @@ -544,10 +542,8 @@ static int plgpio_probe(struct platform_device *pdev)
>  			sizeof(*plgpio->csave_regs) *
>  			DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG),
>  			GFP_KERNEL);
> -	if (!plgpio->csave_regs) {
> -		dev_err(&pdev->dev, "csave registers memory allocation fail\n");
> +	if (!plgpio->csave_regs)
>  		return -ENOMEM;
> -	}
>  #endif
>  
>  	platform_set_drvdata(pdev, plgpio);

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio
@ 2017-12-28  5:26   ` Viresh Kumar
  0 siblings, 0 replies; 9+ messages in thread
From: Viresh Kumar @ 2017-12-28  5:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 27-12-17, 22:39, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Dec 2017 22:34:28 +0100
> 
> Omit extra messages for a memory allocation failure in this function.
> 
> This issue was detected by using the Coccinelle software.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/pinctrl/spear/pinctrl-plgpio.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
> index 6a0ed8ab33b9..d2123e396b29 100644
> --- a/drivers/pinctrl/spear/pinctrl-plgpio.c
> +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
> @@ -519,10 +519,8 @@ static int plgpio_probe(struct platform_device *pdev)
>  	int ret, irq;
>  
>  	plgpio = devm_kzalloc(&pdev->dev, sizeof(*plgpio), GFP_KERNEL);
> -	if (!plgpio) {
> -		dev_err(&pdev->dev, "memory allocation fail\n");
> +	if (!plgpio)
>  		return -ENOMEM;
> -	}
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	plgpio->base = devm_ioremap_resource(&pdev->dev, res);
> @@ -544,10 +542,8 @@ static int plgpio_probe(struct platform_device *pdev)
>  			sizeof(*plgpio->csave_regs) *
>  			DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG),
>  			GFP_KERNEL);
> -	if (!plgpio->csave_regs) {
> -		dev_err(&pdev->dev, "csave registers memory allocation fail\n");
> +	if (!plgpio->csave_regs)
>  		return -ENOMEM;
> -	}
>  #endif
>  
>  	platform_set_drvdata(pdev, plgpio);

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_probe()
  2017-12-27 21:39 ` [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_pro SF Markus Elfring
  (?)
@ 2018-01-02  8:58   ` Linus Walleij
  -1 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2018-01-02  8:58 UTC (permalink / raw)
  To: SF Markus Elfring
  Cc: linux-gpio, Linux ARM, Viresh Kumar, LKML, kernel-janitors

On Wed, Dec 27, 2017 at 10:39 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Dec 2017 22:34:28 +0100
>
> Omit extra messages for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Patch applied with Viresh's ACK.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio
@ 2018-01-02  8:58   ` Linus Walleij
  0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2018-01-02  8:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 27, 2017 at 10:39 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Dec 2017 22:34:28 +0100
>
> Omit extra messages for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Patch applied with Viresh's ACK.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_probe()
@ 2018-01-02  8:58   ` Linus Walleij
  0 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2018-01-02  8:58 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 27, 2017 at 10:39 PM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Wed, 27 Dec 2017 22:34:28 +0100
>
> Omit extra messages for a memory allocation failure in this function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>

Patch applied with Viresh's ACK.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-01-02  8:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-27 21:39 [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_probe() SF Markus Elfring
2017-12-27 21:39 ` SF Markus Elfring
2017-12-27 21:39 ` [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_pro SF Markus Elfring
2017-12-28  5:26 ` [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_probe() Viresh Kumar
2017-12-28  5:38   ` [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio Viresh Kumar
2017-12-28  5:26   ` [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio_probe() Viresh Kumar
2018-01-02  8:58 ` Linus Walleij
2018-01-02  8:58   ` Linus Walleij
2018-01-02  8:58   ` [PATCH] pinctrl/spear/plgpio: Delete two error messages for a failed memory allocation in plgpio Linus Walleij

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.