The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Keyur Patel <iamkeyur96@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: iamkeyur96@gmail.com, Johan Hovold <johan@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] gnss: core: added logging statement when kfifo_alloc fails
Date: Tue,  9 Jul 2019 19:14:48 -0400	[thread overview]
Message-ID: <20190709231448.30799-1-iamkeyur96@gmail.com> (raw)

Added missing logging statement when kfifo_alloc fails, to improve
debugging.

Signed-off-by: Keyur Patel <iamkeyur96@gmail.com>
---
 drivers/gnss/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c
index e6f94501cb28..4377adfa25b4 100644
--- a/drivers/gnss/core.c
+++ b/drivers/gnss/core.c
@@ -256,6 +256,7 @@ struct gnss_device *gnss_allocate_device(struct device *parent)
 
 	ret = kfifo_alloc(&gdev->read_fifo, GNSS_READ_FIFO_SIZE, GFP_KERNEL);
 	if (ret)
+		pr_err("kfifo_alloc failed\n");
 		goto err_put_device;
 
 	gdev->write_buf = kzalloc(GNSS_WRITE_BUF_SIZE, GFP_KERNEL);
-- 
2.22.0


             reply	other threads:[~2019-07-10  3:14 UTC|newest]

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

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=20190709231448.30799-1-iamkeyur96@gmail.com \
    --to=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