Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1419449

Re: [PATCH v2 4/4] max8903: remove unnecessary malloc failed message print out.

From Krzysztof Kozlowski <k.kozlowski@samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 4/4] max8903: remove unnecessary malloc failed message print out.
Date 2016-06-10 16:10 +0200
Message-ID <rIvih-5yi-3@gated-at.bofh.it> (permalink)
References <rFuC5-2sz-13@gated-at.bofh.it> <rItTb-4zv-7@gated-at.bofh.it> <rItTb-4zv-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 06/10/2016 02:32 PM, Chris Lapa wrote:
> From: Chris Lapa <chris@lapa.com.au>

Here and in all other patches (like #1) you need to write something. The
commit title could be very short (even non-sentence) and here a little
bit longer. E.g.:

Title: power: max8903: Remove pointless 'out of memory' error message
Body: Remove the error message of memory allocation failure because it
is printed by core.

Best regards,
Krzysztof

> Signed-off-by: Chris Lapa <chris@lapa.com.au>
> ---
>  drivers/power/max8903_charger.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/power/max8903_charger.c b/drivers/power/max8903_charger.c
> index 20d4b55..d60f9b2 100644
> --- a/drivers/power/max8903_charger.c
> +++ b/drivers/power/max8903_charger.c
> @@ -246,10 +246,8 @@ static int max8903_probe(struct platform_device *pdev)
>  	int usb_in = 0;
>  
>  	charger = devm_kzalloc(dev, sizeof(struct max8903_data), GFP_KERNEL);
> -	if (charger == NULL) {
> -		dev_err(dev, "Cannot allocate memory.\n");
> +	if (!charger)
>  		return -ENOMEM;
> -	}
>  
>  	charger->pdata = pdev->dev.platform_data;
>  	if (IS_ENABLED(CONFIG_OF) && !charger->pdata && dev->of_node) {
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] max8903: cleans up confusing relationship between dc_valid, dok and dcm. chris@lapa.com.au - 2016-06-02 08:50 +0200
  [PATCH v2 4/4] max8903: remove unnecessary malloc failed message print out. Chris Lapa <chris@lapa.com.au> - 2016-06-10 14:40 +0200
    Re: [PATCH v2 4/4] max8903: remove unnecessary malloc failed message  print out. Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-10 16:10 +0200
  [PATCH v2 1/4] max8903: adds documentation for device tree bindings. Chris Lapa <chris@lapa.com.au> - 2016-06-10 14:40 +0200
    Re: [PATCH v2 1/4] max8903: adds documentation for device tree  bindings. Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-10 16:00 +0200
  [PATCH v2 2/4] max8903: adds support for initiation via device tree. Chris Lapa <chris@lapa.com.au> - 2016-06-10 14:40 +0200
    Re: [PATCH v2 2/4] max8903: adds support for initiation via device  tree. Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-06-10 16:10 +0200
  [PATCH v2 3/4] max8903: cleans up confusing relationship between dc_valid, dok and dcm. Chris Lapa <chris@lapa.com.au> - 2016-06-10 14:40 +0200
  [PATCH v2 0/4]  max8903: Add device tree support and logic fixup Chris Lapa <chris@lapa.com.au> - 2016-06-10 14:40 +0200

csiph-web