soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create
authorKeerthy <j-keerthy@ti.com>
Mon, 31 Jul 2017 04:31:36 +0000 (10:01 +0530)
committerArnd Bergmann <arnd@arndb.de>
Mon, 21 Aug 2017 07:19:50 +0000 (09:19 +0200)
commit4459398b6d9e3055ced5de9820364b3bdd79ac25
tree0abf5181b2fe16ecd19229382d61f5d413dcf48c
parent4dd6a9973b8aaffac4bf37c5bb70e8eae5a7afb4
soc: ti: knav: Add a NULL pointer check for kdev in knav_pool_create

knav_pool_create is an exported function. In the event of a call
before knav_queue_probe, we encounter a NULL pointer dereference
in the following line. Hence return -EPROBE_DEFER to the caller till
the kdev pointer is non-NULL.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/soc/ti/knav_qmss_queue.c