From patchwork Tue Sep 1 15:09:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 264562 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CBE0C433E2 for ; Tue, 1 Sep 2020 16:36:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 27287207D3 for ; Tue, 1 Sep 2020 16:36:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598978202; bh=G7hxTffaqe+Bxa7p5NVLTRKMskTbwn8S9WqqzMk2v74=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=WZDREleZa4NeoUHcOHGF27WNXy/UHpyxaADqXJ66fNXTnGpJ2bnpH+xizFi/pUPch bgxHjZCZ+XTlVcnBA2O5xletFn2A1aY7bGDNFzsGaQbwOrqZ4uoJwvd7zPXVXQaUGq pp8G+EPsZM1VJG1wzr/gQy+G+NW3E+Y3C6PwKVEM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727009AbgIAQgf (ORCPT ); Tue, 1 Sep 2020 12:36:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:58998 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729301AbgIAP3f (ORCPT ); Tue, 1 Sep 2020 11:29:35 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 66AF620FC3; Tue, 1 Sep 2020 15:29:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598974174; bh=G7hxTffaqe+Bxa7p5NVLTRKMskTbwn8S9WqqzMk2v74=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hzbcmso30S81fRjHMhZWGK6wgJQSMi+ZOh5rSR9P38IReUGnMdkCU4LH60PiSa4OW KkpLljlWMoWdm1L/yFgv/RXRjEOiVcB9oiU4DwFQBShPwML8585DD+gbhXRrjTrIbP HWVb3ClD2DJFkoTIvO23txBeP8Zf8+SWybmCETwc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ding Xiang , Oleksandr Andrushchenko , Daniel Vetter , Sasha Levin Subject: [PATCH 5.4 074/214] drm/xen: fix passing zero to PTR_ERR warning Date: Tue, 1 Sep 2020 17:09:14 +0200 Message-Id: <20200901150956.517513806@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200901150952.963606936@linuxfoundation.org> References: <20200901150952.963606936@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Ding Xiang [ Upstream commit 4c1cb04e0e7ac4ba1ef5457929ef9b5671d9eed3 ] Fix a static code checker warning: drivers/gpu/drm/xen/xen_drm_front.c:404 xen_drm_drv_dumb_create() warn: passing zero to 'PTR_ERR' Signed-off-by: Ding Xiang Reviewed-by: Oleksandr Andrushchenko Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1585562347-30214-1-git-send-email-dingxiang@cmss.chinamobile.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/xen/xen_drm_front.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c index 4be49c1aef518..374142018171c 100644 --- a/drivers/gpu/drm/xen/xen_drm_front.c +++ b/drivers/gpu/drm/xen/xen_drm_front.c @@ -401,7 +401,7 @@ static int xen_drm_drv_dumb_create(struct drm_file *filp, obj = xen_drm_front_gem_create(dev, args->size); if (IS_ERR_OR_NULL(obj)) { - ret = PTR_ERR(obj); + ret = PTR_ERR_OR_ZERO(obj); goto fail; }