mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Keyur Patel <iamkeyur96@gmail.com>
Cc: Johan Hovold <johan@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] gnss: core: added logging statement when kfifo_alloc fails
Date: Thu, 11 Jul 2019 01:26:46 -0700	[thread overview]
Message-ID: <acf9141ed9e4c33585a9784d14a6b95ec58558c8.camel@perches.com> (raw)
In-Reply-To: <20190709235957.2481-1-iamkeyur96@gmail.com>

On Tue, 2019-07-09 at 19:59 -0400, Keyur Patel wrote:
> Added missing logging statement when kfifo_alloc fails, to improve
> debugging.
[]
> Changes in v2:
> - fixed braces
[]
> diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c
[]
> @@ -255,8 +255,10 @@ struct gnss_device *gnss_allocate_device(struct device *parent)
>  	init_waitqueue_head(&gdev->read_queue);
>  
>  	ret = kfifo_alloc(&gdev->read_fifo, GNSS_READ_FIFO_SIZE, GFP_KERNEL);
> -	if (ret)
> +	if (ret) {
> +		pr_err("kfifo_alloc failed\n");
>  		goto err_put_device;
> +	}

This isn't really necessary as kfifo_alloc just
calls kmalloc_array and without the __GFP_NOWARN
flag, already does a dump_stack()



      reply	other threads:[~2019-07-11  8:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09 23:14 [PATCH] " Keyur Patel
2019-07-10  3:40 ` Joe Perches
2019-07-09 23:59   ` [PATCH v2] " Keyur Patel
2019-07-11  8:26     ` Joe Perches [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=acf9141ed9e4c33585a9784d14a6b95ec58558c8.camel@perches.com \
    --to=joe@perches.com \
    --cc=iamkeyur96@gmail.com \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®