clk: fix error check for devm_clk_get_optional()
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Thu, 9 Jan 2020 03:35:05 +0000 (11:35 +0800)
committerTom Rini <trini@konsulko.com>
Thu, 16 Jan 2020 14:39:45 +0000 (09:39 -0500)
commit0f9b2b3ddf36d4bf69011a0dddefa10091cee60d
treeb97889be0f3388ccbd2b84f53ac2ca7b23604884
parent5f82a940a0379e32b3553bc0cd6d3ece2f8d0141
clk: fix error check for devm_clk_get_optional()

If skip all return error number, it may skip some real error cases,
so only skip the error when the clock is not provided in DTS

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
drivers/clk/clk-uclass.c