]> git.baikalelectronics.ru Git - kernel.git/commit
drm/panel: lvds: Handle the optional regulator case properly
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 10 Jan 2018 15:59:41 +0000 (16:59 +0100)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 15 Jan 2018 09:16:56 +0000 (10:16 +0100)
commitd1dcf0196ab4f84602ca33f0501ab20b5bbf0e3d
treee3e873ce0c06c5fbab93ae13f6383732280bdf4d
parentd70e9bbc3fcd574675b317706c919023705ed29d
drm/panel: lvds: Handle the optional regulator case properly

The devm_regulator_get_optional function, unlike it was assumed in the
commit c9cca1a935b3 ("drm/panel: lvds: Add support for the power-supply
property"), is actually returning an error pointer with -ENODEV instead of
NULL when there's no regulator to find.

Make sure we handle that case properly.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Fixes: c9cca1a935b3 ("drm/panel: lvds: Add support for the power-supply property")
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180110155941.16109-1-maxime.ripard@free-electrons.com
drivers/gpu/drm/panel/panel-lvds.c