]> git.baikalelectronics.ru Git - kernel.git/commit
mailbox: mediatek: Add check for possible failure of kzalloc
authorHoulong Wei <houlong.wei@mediatek.com>
Tue, 21 Aug 2018 10:22:44 +0000 (18:22 +0800)
committerJassi Brar <jaswinder.singh@linaro.org>
Sat, 29 Sep 2018 07:12:39 +0000 (12:42 +0530)
commit39f37e9f6a9d9b7617898740e10f09612ebca190
tree73984996edf075d6ab8a080139ae5ad63b864370
parentededc8a269946b6be8351cd72ab4691ceaa50d83
mailbox: mediatek: Add check for possible failure of kzalloc

The patch b04033786ffb("mailbox: mediatek: Add Mediatek CMDQ driver")
introduce the following static checker warning:
  drivers/mailbox/mtk-cmdq-mailbox.c:366 cmdq_mbox_send_data()
  error: potential null dereference 'task'.  (kzalloc returns null)

Fixes: b04033786ffb ("mailbox: mediatek: Add Mediatek CMDQ driver")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Houlong Wei <houlong.wei@mediatek.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/mtk-cmdq-mailbox.c