• Wen Yang's avatar
    drm/msm: Fix error return checking · 098336de
    Wen Yang authored
    The error checks on ret for a negative error return always fails because
    the return value of iommu_map_sg() is unsigned and can never be negative.
    
    Detected with Coccinelle:
    drivers/gpu/drm/msm/msm_iommu.c:69:9-12: WARNING: Unsigned expression
    compared with zero: ret < 0
    Signed-off-by: default avatarWen Yang <wen.yang99@zte.com.cn>
    CC: Rob Clark <robdclark@gmail.com>
    CC: David Airlie <airlied@linux.ie>
    CC: Julia Lawall <julia.lawall@lip6.fr>
    CC: linux-arm-msm@vger.kernel.org
    CC: dri-devel@lists.freedesktop.org
    CC: freedreno@lists.freedesktop.org
    CC: linux-kernel@vger.kernel.org
    Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
    098336de
msm_iommu.c 2.97 KB