linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Input: da9055_onkey: Remove unnecessary OOM meassage
@ 2014-08-08  7:14 Kiran Padwal
  2014-08-08 16:26 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Kiran Padwal @ 2014-08-08  7:14 UTC (permalink / raw)
  To: support.opensource, dmitry.torokhov
  Cc: anthony.olech.opensource, david.chen, kiran.padwal21, linux-input,
	linux-kernel, Kiran Padwal

There is no need to print out-of-memory errors since this is already
done by the memory management subsystem which even calls dump_stack().

Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
---
 drivers/input/misc/da9055_onkey.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/input/misc/da9055_onkey.c b/drivers/input/misc/da9055_onkey.c
index 4765799..ed6eaa9 100644
--- a/drivers/input/misc/da9055_onkey.c
+++ b/drivers/input/misc/da9055_onkey.c
@@ -87,10 +87,8 @@ static int da9055_onkey_probe(struct platform_device *pdev)
 	}
 
 	onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL);
-	if (!onkey) {
-		dev_err(&pdev->dev, "Failed to allocate memory\n");
+	if (!onkey)
 		return -ENOMEM;
-	}
 
 	input_dev = input_allocate_device();
 	if (!input_dev) {
-- 
1.7.9.5

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

* Re: [PATCH 1/2] Input: da9055_onkey: Remove unnecessary OOM meassage
  2014-08-08  7:14 [PATCH 1/2] Input: da9055_onkey: Remove unnecessary OOM meassage Kiran Padwal
@ 2014-08-08 16:26 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2014-08-08 16:26 UTC (permalink / raw)
  To: Kiran Padwal
  Cc: support.opensource, anthony.olech.opensource, david.chen,
	kiran.padwal21, linux-input, linux-kernel

On Fri, Aug 08, 2014 at 12:44:57PM +0530, Kiran Padwal wrote:
> There is no need to print out-of-memory errors since this is already
> done by the memory management subsystem which even calls dump_stack().

This is implementation detail as far as I am concerned. We might switch
dumping stack off down the road.

Thanks.

> 
> Signed-off-by: Kiran Padwal <kiran.padwal@smartplayin.com>
> ---
>  drivers/input/misc/da9055_onkey.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/input/misc/da9055_onkey.c b/drivers/input/misc/da9055_onkey.c
> index 4765799..ed6eaa9 100644
> --- a/drivers/input/misc/da9055_onkey.c
> +++ b/drivers/input/misc/da9055_onkey.c
> @@ -87,10 +87,8 @@ static int da9055_onkey_probe(struct platform_device *pdev)
>  	}
>  
>  	onkey = devm_kzalloc(&pdev->dev, sizeof(*onkey), GFP_KERNEL);
> -	if (!onkey) {
> -		dev_err(&pdev->dev, "Failed to allocate memory\n");
> +	if (!onkey)
>  		return -ENOMEM;
> -	}
>  
>  	input_dev = input_allocate_device();
>  	if (!input_dev) {
> -- 
> 1.7.9.5
> 

-- 
Dmitry

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

end of thread, other threads:[~2014-08-08 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-08  7:14 [PATCH 1/2] Input: da9055_onkey: Remove unnecessary OOM meassage Kiran Padwal
2014-08-08 16:26 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).