Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36562046rwd; Tue, 11 Jul 2023 02:40:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlEdmxVQUeggLBvP79uc0/HjtRB+RZyCNXD61dZOKbLW+1WJkL9qzENIAovqlMx98AwaN/Tk X-Received: by 2002:a05:620a:2493:b0:767:c7d2:2f15 with SMTP id i19-20020a05620a249300b00767c7d22f15mr10320520qkn.58.1689068445145; Tue, 11 Jul 2023 02:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689068445; cv=none; d=google.com; s=arc-20160816; b=PkmsdF+H55ysSwJVAiE5gd3iZu2DzD6ta1wkHVkXqeWxS4Tcy+Calbh3WxgNmwY9bD D78fhwxpPGS/zO/wuuG6EbsR+ZD09n2WMHwT/rmQsGMltardBAHA/vAyo+E6NuH70EF3 4asiqjtPslaUPrzER+ZAJa8XBznuimDBk922enj+df7NZvjAH4y6Eq74DGd1dAeeQpSU lTUkuZKDUIJ8tGScal57lmgpSdwCWsLgre4fE6/rZdKu9nyYuFeVUKrFrA1ihb8FzEE0 38Gzh4TZ+ATwVmmVCloJigixBS261eNk6AeahJvFgSyXU4rTa4r0CWkxIIlGdq44sFr7 0a+A== 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 :message-id:date:subject:cc:to:from; bh=YkivqRxkF1YIwNXYz/woF7MbAtnDtE3g32hETRawSfw=; fh=2zPcIY0Rh69U5l7yN+RePAw5aBafWaK14C7f8XEMOOk=; b=CkrAUqFxrXYjJTsn4B36mxMStjwnxRhcNmdLt/EEoKDGBkzURMPUxzb/caUD941NT1 SPyWVpY62eQaSOqj9yjVaWMDkxA9bzUdZzRv1Qq/HL/JrF+XrtIJsjXSCnwENxMefIcg Ju2Jqd5WDZ/Yj7VbOhMJhVaqHamiMDRjRovTj1jBd1OnXM/GGScg7NUWayJxydiBstes 8s33z5LbrjdXoqzoyZhsfyuw/DA2kj7lvRvpsFY5oFD6MqNUMsQ9P+KNlqqdHnXGPUcb ZBjiJ3iWR1UNSD2VK0vENfRSv8hC14cVynKfgAh4m9cVlTu4IqPdUgaeSLWkXRoEkuaE xoPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c9-20020a17090ab28900b00263fbeed5d9si1331344pjr.57.2023.07.11.02.40.33; Tue, 11 Jul 2023 02:40:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231792AbjGKJCl (ORCPT + 99 others); Tue, 11 Jul 2023 05:02:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231786AbjGKJCh (ORCPT ); Tue, 11 Jul 2023 05:02:37 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 2606310FD; Tue, 11 Jul 2023 02:02:31 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id E50846062ABD8; Tue, 11 Jul 2023 17:02:24 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: airlied@redhat.com, kraxel@redhat.com, gurchetansingh@chromium.org, olvaffe@gmail.com, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Su Hui Subject: [PATCH] drm/virtio: remove some redundant code Date: Tue, 11 Jul 2023 17:00:31 +0800 Message-Id: <20230711090030.692551-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org virtio_gpu_get_vbuf always be successful, so remove the error judgment. Signed-off-by: Su Hui --- drivers/gpu/drm/virtio/virtgpu_vq.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index b1a00c0c25a7..7a2680b3f1a7 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -129,10 +129,6 @@ virtio_gpu_alloc_cursor(struct virtio_gpu_device *vgdev, vbuf = virtio_gpu_get_vbuf (vgdev, sizeof(struct virtio_gpu_update_cursor), 0, NULL, NULL); - if (IS_ERR(vbuf)) { - *vbuffer_p = NULL; - return ERR_CAST(vbuf); - } *vbuffer_p = vbuf; return (struct virtio_gpu_update_cursor *)vbuf->buf; } -- 2.30.2