• Geert Uytterhoeven's avatar
    [media] rcar-fcp: Make sure rcar_fcp_enable() returns 0 on success · 7892a1f6
    Geert Uytterhoeven authored
    When resuming from suspend-to-RAM on r8a7795/salvator-x:
    
        dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1
        PM: Device fe940000.fdp1 failed to resume noirq: error 1
        dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1
        PM: Device fe944000.fdp1 failed to resume noirq: error 1
        dpm_run_callback(): pm_genpd_resume_noirq+0x0/0x90 returns 1
        PM: Device fe948000.fdp1 failed to resume noirq: error 1
    
    According to its documentation, rcar_fcp_enable() returns 0 on success
    or a negative error code if an error occurs.  Hence
    fdp1_pm_runtime_resume() and vsp1_pm_runtime_resume() forward its return
    value to their callers.
    
    However, rcar_fcp_enable() forwards the return value of
    pm_runtime_get_sync(), which can actually be 1 on success, leading to
    the resume failure above.
    
    To fix this, consider only negative values returned by
    pm_runtime_get_sync() to be failures.
    
    Fixes: 7b49235e ("[media] v4l: Add Renesas R-Car FCP driver")
    Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
    Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
    7892a1f6
Name
Last commit
Last update
..
am437x Loading commit data...
blackfin Loading commit data...
coda Loading commit data...
davinci Loading commit data...
exynos-gsc Loading commit data...
exynos4-is Loading commit data...
marvell-ccic Loading commit data...
mtk-vcodec Loading commit data...
mtk-vpu Loading commit data...
omap Loading commit data...
omap3isp Loading commit data...
rcar-vin Loading commit data...
s3c-camif Loading commit data...
s5p-g2d Loading commit data...
s5p-jpeg Loading commit data...
s5p-mfc Loading commit data...
s5p-tv Loading commit data...
soc_camera Loading commit data...
sti Loading commit data...
ti-vpe Loading commit data...
vivid Loading commit data...
vsp1 Loading commit data...
xilinx Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
arv.c Loading commit data...
fsl-viu.c Loading commit data...
m2m-deinterlace.c Loading commit data...
mx2_emmaprp.c Loading commit data...
rcar-fcp.c Loading commit data...
rcar_jpu.c Loading commit data...
sh_veu.c Loading commit data...
sh_vou.c Loading commit data...
via-camera.c Loading commit data...
via-camera.h Loading commit data...
vim2m.c Loading commit data...