lkml.org 
[lkml]   [2019]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2] gnss: core: added logging statement when kfifo_alloc fails
Date
Added missing logging statement when kfifo_alloc fails, to improve
debugging.

Signed-off-by: Keyur Patel <iamkeyur96@gmail.com>
---
Changes in v2:
- fixed braces
---
drivers/gnss/core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c
index e6f94501cb28..1b7387ee643b 100644
--- 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;
+ }

gdev->write_buf = kzalloc(GNSS_WRITE_BUF_SIZE, GFP_KERNEL);
if (!gdev->write_buf)
--
2.22.0
\
 
 \ /
  Last update: 2019-07-10 06:00    [W:0.411 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site