Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp485351ybl; Tue, 28 Jan 2020 06:41:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwB3T73qFjpxWvL4OSvaTfiY3nqJqJ68IsFLGtjf5VFoXzR7fYVaFHrnZ2yOOiNC1S/f5dG X-Received: by 2002:a9d:8f1:: with SMTP id 104mr15718993otf.107.1580222509059; Tue, 28 Jan 2020 06:41:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580222509; cv=none; d=google.com; s=arc-20160816; b=ecrU8N0MRRdUKH0mzyX1XcSimpoFXpenerW2UOOZ6hNx2p77ka8iZX87OSJJDfdTaT dtZZRp3wryN+tk6c7ddwLYpkg7LgcAxpiP3wSTloTD/MEAz7ddO72Jro8PEXaH/XeE84 lxRRc0ew3KGa4NmxJx0PZ8lLT+9Jzd556PyjLgw0OzNzyTYzT6QFx/NlWCfx0j2EB9hj mOvbG4bDvdaG8W5V5e8w4mdzRkWGf2RKECQrQDvuqnfFrb7KnocoUaN80vm6P07uWdWA GNzj0G/nIIejuvpK+UxjnxYvAE8/WugL3y+Ksblj5xyWe7d80HTnUsefu2vIO1GvZ9pZ dCqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=diEuM9s0KB1Lrg+BhtckcJe14ajOBRBqB9KxEQPGWRA=; b=BIuW4n01HQzrguOu5oFMcNX5dtZ9qDQSV2OJJPNlro/Wp0QsMJTzr381s6EUo8u/XU zJ/pRzjqOfb00NtMsycHybgiGSJaasB2uXzna2RNI3pH6MFZnQiM7w9BD8WYbR/rMB3Q 1wiqZXxdwRlYT0LjzR/Go6kvRgCMMDR/lEH1goYycYimEL+9pLazr6UKsssaNBqmRrmj ae36IxnEs2imEW9C9oKn62LuGrbCI4sUNLZFw8eUzODpIt/eNv0yLDe6+cLlf3O0URra pp4ahIglOHiEtOelGOe8rbtxhbRuKVIjo2zKZUxP2KTTOWV0r8IqVp5fdmGwAL3nU0tF K/LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bJUO7raO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si3006210oti.22.2020.01.28.06.41.36; Tue, 28 Jan 2020 06:41:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bJUO7raO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729752AbgA1OkE (ORCPT + 99 others); Tue, 28 Jan 2020 09:40:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:39738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729550AbgA1OQX (ORCPT ); Tue, 28 Jan 2020 09:16:23 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 61DB92071E; Tue, 28 Jan 2020 14:16:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580220982; bh=tfwD6ef79rDoiFi7GYGxjXc3Q/jOMh8vwLLV4P+xwt0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bJUO7raOfS97GVnThevJvGWhC4lUFq7D8TckpbvLNUlH4xuN210KIbaTcO6vPqr3S WJlGOi0O0gi7lztp6JNJh5lzGrnPvGOtIMZUkmHr1dy1oohDoV34G63msr6j1/uKHn d629lwd2AuiZK+O009+nXfA6ld9Vx4vvkoTbU2A8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Lucas Stach , Sasha Levin Subject: [PATCH 4.9 042/271] drm/etnaviv: NULL vs IS_ERR() buf in etnaviv_core_dump() Date: Tue, 28 Jan 2020 15:03:11 +0100 Message-Id: <20200128135855.789943960@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200128135852.449088278@linuxfoundation.org> References: <20200128135852.449088278@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit f8261c376e7f8cb9024af5a6c54be540c7f9108e ] The etnaviv_gem_get_pages() never returns NULL. It returns error pointers on error. Fixes: a8c21a5451d8 ("drm/etnaviv: add initial etnaviv DRM driver") Signed-off-by: Dan Carpenter Signed-off-by: Lucas Stach Signed-off-by: Sasha Levin --- drivers/gpu/drm/etnaviv/etnaviv_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_dump.c b/drivers/gpu/drm/etnaviv/etnaviv_dump.c index 2bef501d4a172..5af7c2594a79e 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_dump.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_dump.c @@ -206,7 +206,7 @@ void etnaviv_core_dump(struct etnaviv_gpu *gpu) mutex_lock(&obj->lock); pages = etnaviv_gem_get_pages(obj); mutex_unlock(&obj->lock); - if (pages) { + if (!IS_ERR(pages)) { int j; iter.hdr->data[0] = bomap - bomap_start; -- 2.20.1