clk: check valid clock by clk_valid()
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Thu, 9 Jan 2020 03:35:06 +0000 (11:35 +0800)
committerTom Rini <trini@konsulko.com>
Thu, 16 Jan 2020 14:39:45 +0000 (09:39 -0500)
commitbd7c798605a33107ccce6d5023af8adf9febc4f1
treed6f710a54eb37167b042f5e6c2557841c5a2bd26
parent0f9b2b3ddf36d4bf69011a0dddefa10091cee60d
clk: check valid clock by clk_valid()

Add valid check for clk->dev, it's useful when get optional
clock even when the clk point is valid, but its dev will be
NULL.

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