drm/bridge: Add missing pm_runtime_put_sync
authorYongzhi Liu <lyz_cs@pku.edu.cn>
Mon, 24 Jan 2022 07:20:35 +0000 (23:20 -0800)
committerRobert Foss <robert.foss@linaro.org>
Mon, 31 Jan 2022 15:25:39 +0000 (16:25 +0100)
commit46f47807738441e354873546dde0b000106c068a
treeb06d85667f8dc2c9f83f4a83b72bc80295cee53d
parent9d6bf794084d9258dadf2754d911fcfeb13ea8fc
drm/bridge: Add missing pm_runtime_put_sync

pm_runtime_get_sync() will increase the rumtime PM counter
even when it returns an error. Thus a pairing decrement is needed
to prevent refcount leak. Fix this by replacing this API with
pm_runtime_resume_and_get(), which will not change the runtime
PM counter on error. Besides, a matching decrement is needed
on the error handling path to keep the counter balanced.

Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1643008835-73961-1-git-send-email-lyz_cs@pku.edu.cn
drivers/gpu/drm/bridge/nwl-dsi.c