Input: tsc2004/5 - fix regulator handling
In case of an optional regulator missing, regulator core will return ERR_PTR(-ENOENT) and not NULL, so the check for missing regulator is incorrect. Also, the regulator is not optional, it may simply be missing from platform description, so let's use devm_regulator_get() and rely on regulator core to give us dummy supply when real one is not available. Fixes: d257f298 ("Input: tsc2005 - convert to gpiod") Acked-By: NSebastian Reichel <sre@kernel.org> Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
Showing
想要评论请 注册 或 登录