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)
commit8ac9e914a49ffd5ce5877d332c190f24d13725a9
tree16ee6e4ae662cb5c9e114f2e3bb79b8a7649a1a4
parent68d9c47b1679ec8d55a005d39fc7a958ece82095
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