Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9077993pxu; Mon, 28 Dec 2020 06:07:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3UqxfHVggI8gQlqa0eP5Fkn8D85BuWn/kLryvtSxC9UHR4qhUSblfVcDFPk7NMXqzxXKB X-Received: by 2002:a17:906:e18:: with SMTP id l24mr40370768eji.434.1609164453450; Mon, 28 Dec 2020 06:07:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609164453; cv=none; d=google.com; s=arc-20160816; b=XzoEXwjueg269p3+UbJrKsXVKsxIn3yls8onQ7lDlkVv1B8J/ekxTcyR7SQow5f5do pwT0/aPM3OROlbPQmnfHkmgapy6XMgf/YzLzmITviWXhrRtWvDaMWOTXv+GgPEVoEe0s E5xY5MFMJ+OIPp37ihYActI8rAGVCXLzoXcy2yjD1BSOgf8FPAThNgVhxuJd/ZNCqx/x afDX6AWeGG8NnuXefHFvKwU3Qj6p80wQcBx7zKfBruP+zYAE9BFQpDFdDDmZ194Oq49s v5LVQtLHcMTYV+hJwrwS2BeGpedjx818deo7lB4/85xOSqzE++0vt7ysGXj/IgLxGnNn N0Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EENsHnZCFS39dSprjf5fwNdSAIjXNi7Kc86r6FuXV/g=; b=Ev6PLBq0QohwhqLoNsaFjGuzCxTNTAi+CAafhnh8RCOMUe18T2XfU69gfkr2320dnY dWsYn6n0QarDdSZDJ7UE1yggIu8VTzWVpJjiUIvrY6u7pJFcMcyLC5Rk8VPBm24q1guZ XwSCPHbo8OwWe4vjRP266CuvBo7sjAXplT0YV4agR8Uut+CVCpAic8uZymDlSHfhBGnZ KUF/Nc1MJhonXp+pOXEjVEQTTLDfqjGwPypWN5kiDXofIscR9C4r9shTHnb/8vPvrBy8 rF7xoQ3J61e5CnZjkVhd7nmmTu2n6pAkvCssB+LpVbxGG8Rx1irhyCkdNCs76rW/w1Uv zKWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iHuB1cr2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v16si20092050edw.399.2020.12.28.06.07.10; Mon, 28 Dec 2020 06:07:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iHuB1cr2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437565AbgL1OFI (ORCPT + 99 others); Mon, 28 Dec 2020 09:05:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:39074 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437541AbgL1OFD (ORCPT ); Mon, 28 Dec 2020 09:05:03 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5A0A5205CB; Mon, 28 Dec 2020 14:04:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164287; bh=Q6ZCDaGj87pPJkIhVCl1IhNw+CYWZe+1Srtr4DHkC2A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iHuB1cr2m/Xo+n2XKgC4WLmC4nE/GB3zNzYSN/CNlCdXaqk7u4g7y9B3iSPcYZKfm KVVaUwmfizxvqYK3UJmx5l4fIWqCLE6gr+L7be4UEJft9pl15LS7yRTNylCXkvpu8v q09wIJqzCCBmV9rHhvfWOtYnzPxmTTYUZvXtUs14= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Thomas Zimmermann , Sasha Levin Subject: [PATCH 5.10 110/717] drm/udl: Fix missing error code in udl_handle_damage() Date: Mon, 28 Dec 2020 13:41:48 +0100 Message-Id: <20201228125026.226024488@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit a7319c8f50c5e93a12997e2d0821a2f7946fb734 ] If udl_get_urb() fails then this should return a negative error code but currently it returns success. Fixes: 798ce3fe1c3a ("drm/udl: Begin/end access to imported buffers in damage-handler") Signed-off-by: Dan Carpenter Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20201113101502.GD168908@mwanda Signed-off-by: Sasha Levin --- drivers/gpu/drm/udl/udl_modeset.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c index fef43f4e3bac4..edcfd8c120c44 100644 --- a/drivers/gpu/drm/udl/udl_modeset.c +++ b/drivers/gpu/drm/udl/udl_modeset.c @@ -303,8 +303,10 @@ static int udl_handle_damage(struct drm_framebuffer *fb, int x, int y, } urb = udl_get_urb(dev); - if (!urb) + if (!urb) { + ret = -ENOMEM; goto out_drm_gem_shmem_vunmap; + } cmd = urb->transfer_buffer; for (i = clip.y1; i < clip.y2; i++) { -- 2.27.0