]> 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)
commit6ae39164a70242fdd44e810538ab5af38eac1da7
tree73984996edf075d6ab8a080139ae5ad63b864370
parent14473a82503f4a819398b948ee1bdb30706befdb
mailbox: mediatek: Add check for possible failure of kzalloc

The patch 1f2ce7b055b5("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: 1f2ce7b055b5 ("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