lkml.org 
[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.5 007/542] drm/qxl: Complete exception handling in qxl_device_init()
    Date
    From: Markus Elfring <elfring@users.sourceforge.net>

    [ Upstream commit dbe3ad61dcebc49fe3efca70a0f752a95b4600f2 ]

    A coccicheck run provided information like the following.

    drivers/gpu/drm/qxl/qxl_kms.c:295:1-7: ERROR: missing iounmap;
    ioremap on line 178 and execution via conditional on line 185

    Generated by: scripts/coccinelle/free/iounmap.cocci

    A jump target was specified in an if branch. The corresponding function
    call did not release the desired system resource then.
    Thus use the label “rom_unmap” instead to fix the exception handling
    for this function implementation.

    Fixes: 5043348a4969ae1661c008efe929abd0d76e3792 ("drm: qxl: Fix error handling at qxl_device_init")
    Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
    Link: http://patchwork.freedesktop.org/patch/msgid/5e5ef9c4-4d85-3c93-cf28-42cfcb5b0649@web.de
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/gpu/drm/qxl/qxl_kms.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c
    index 611cbe7aee690..bfc1631093e9b 100644
    --- a/drivers/gpu/drm/qxl/qxl_kms.c
    +++ b/drivers/gpu/drm/qxl/qxl_kms.c
    @@ -184,7 +184,7 @@ int qxl_device_init(struct qxl_device *qdev,

    if (!qxl_check_device(qdev)) {
    r = -ENODEV;
    - goto surface_mapping_free;
    + goto rom_unmap;
    }

    r = qxl_bo_init(qdev);
    --
    2.20.1
    \
     
     \ /
      Last update: 2020-02-14 19:26    [W:2.914 / U:16.536 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site