]> git.baikalelectronics.ru Git - kernel.git/commit
media: mtk-mdp: use IS_ERR to check return value of of_clk_get
authorPan Bian <bianpan2016@163.com>
Tue, 8 Aug 2017 14:49:58 +0000 (10:49 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 12:20:42 +0000 (08:20 -0400)
commit527d363bb0b5ba267e13bcae02dccf2db49ea561
tree16ee6e4ae662cb5c9e114f2e3bb79b8a7649a1a4
parentd7565b1c86a3a9b44d7ec9423ee5626a2cb753e9
media: mtk-mdp: use IS_ERR to check return value of of_clk_get

Function of_clk_get() returns an ERR_PTR on failures. In file
mtk_mdp_commp.c, its return value is checked against NULL. Such checks
cannot prevent from accessing bad memory. This patch replaces the NULL
checks with IS_ERR checks.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/mtk-mdp/mtk_mdp_comp.c