drm/rockchip: rgb: don't count non-existent devices when determining subdrivers
authorHeiko Stuebner <heiko.stuebner@theobroma-systems.com>
Tue, 21 Jan 2020 22:48:28 +0000 (23:48 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Wed, 11 Mar 2020 08:44:14 +0000 (09:44 +0100)
commit7cd7943dc55e0f75a8e51af2bbdb2b0415cc3eb7
tree00f649e0b27b87e3c22d3cf83e31c864f890b80c
parent8efef33eff5088ecc748e9d5b3bff6c1c955348f
drm/rockchip: rgb: don't count non-existent devices when determining subdrivers

rockchip_drm_endpoint_is_subdriver() may also return error codes.
For example if the target-node is in the disabled state, so no
platform-device is getting created for it.

In that case current code would count that as external rgb device,
which in turn would make probing the rockchip-drm device fail.

So only count the target as rgb device if the function actually
returns 0.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200121224828.4070067-1-heiko@sntech.de
drivers/gpu/drm/rockchip/rockchip_rgb.c