[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1587140527-30907-1-git-send-email-pthombar@cadence.com>
Date: Fri, 17 Apr 2020 18:22:07 +0200
From: Parshuram Thombare <pthombar@...ence.com>
To: <bbrezillon@...nel.org>, <vitor.soares@...opsys.com>
CC: <pgaj@...ence.com>, <linux-i3c@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <mparab@...ence.com>,
<praneeth@...com>, Parshuram Thombare <pthombar@...ence.com>
Subject: [PATCH v6 5/8] i3c: master: check for non null pointer
This patch add NULL check for struct i3c_generic_ibi_pool *pool
argument of function i3c_generic_ibi_free_pool.
Signed-off-by: Parshuram Thombare <pthombar@...ence.com>
---
drivers/i3c/master.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 2690910d724c..19d4800ed573 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -2667,6 +2667,9 @@ void i3c_generic_ibi_free_pool(struct i3c_generic_ibi_pool *pool)
struct i3c_generic_ibi_slot *slot;
unsigned int nslots = 0;
+ if (!pool)
+ return;
+
while (!list_empty(&pool->free_slots)) {
slot = list_first_entry(&pool->free_slots,
struct i3c_generic_ibi_slot, node);
--
2.17.1
Powered by blists - more mailing lists