From patchwork Thu Jun 22 10:18:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sui Jingfeng X-Patchwork-Id: 111615 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4974914vqr; Thu, 22 Jun 2023 03:57:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5oNjrdMIRksGO4YqnBLS1CRiuRwV2fQnatAiw+JvSK2+QN5/Yc84I3SnXP/X25LXdA8H04 X-Received: by 2002:a05:6a20:1596:b0:10b:e54f:1c00 with SMTP id h22-20020a056a20159600b0010be54f1c00mr14672077pzj.57.1687431456055; Thu, 22 Jun 2023 03:57:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687431456; cv=none; d=google.com; s=arc-20160816; b=doxyXl44UhcmEYV5vdBy8KXM5zHTD059eTJ5qFqSBwU4iXHryF8KU2k6T1NVxdwn6o ekI2jg7aHw9TH8QXwtYkSSXz5N+QyvnxT7GFo9MK7z21HE8EPgFI97dU17gYEnAqNMln WOvZbA5b9Aukh+rPW1+GtVhVMXWl2IWVjxhuudAS6GEYOHlbN4tHpbZi+ZpoR8AGY3x8 e/R8zaIrQEpzy3M1/Ybs1984990c9OeB1rK+ccs2Fu0sXgrEXOvJwDqAtmiUUREINhxe LROPiY6OKdaP80IYe5uI3qUlFR1DQpGB8Zn0vx3xqgS20PNoYcJr5LYRAXE5qk0ANdhn mgjw== 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=sru4iO65AE/PgJU/pt7SEiDkXhb5MPGX8m3wNySIq6c=; b=ZFo0Efz9DPyRfkKW2rlLKucIeQoOnyHGVPy/EGs+oV0dfrkVjjQOsHl/E8IuCBNv6i GXpcAN+SbI85LZlJGxXbbKE3LQ4egJGRH+GDNgq5gO4efoTfrH+qMbskNwTQTvHlwD0k TFbiHsy9oht6CUC0NgGNKTD6Yg7GRlfYaIxzk63mTtydfNpbPPT0NrUPWCuikPtheEED Q5NkJAdQzsWwZAeTJilGrL2UN200+zDtrD8uou7tYqFPTE+27j0fmxR6xJQbT4f2MUue m8Xfl1kOY8A7JskEgEF2Hg3RA2cpqLxM68WrF7CAHog4+yU0sJBrkmFNq7PeZRDxzY9p DQnA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s23-20020a632c17000000b0054fd504e80asi6368000pgs.542.2023.06.22.03.57.23; Thu, 22 Jun 2023 03:57:35 -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 S231247AbjFVKTJ (ORCPT + 99 others); Thu, 22 Jun 2023 06:19:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231264AbjFVKTC (ORCPT ); Thu, 22 Jun 2023 06:19:02 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 22C311A1 for ; Thu, 22 Jun 2023 03:18:59 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8Dx+cUSIJRkkGgAAA--.671S3; Thu, 22 Jun 2023 18:18:58 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cx_c4RIJRkwQICAA--.11118S2; Thu, 22 Jun 2023 18:18:58 +0800 (CST) From: Sui Jingfeng To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/drm_gem.c: Remove surplus else after return Date: Thu, 22 Jun 2023 18:18:57 +0800 Message-Id: <20230622101857.2298773-1-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8Cx_c4RIJRkwQICAA--.11118S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29K BjDU0xBIdaVrnRJUUU9Gb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26c xKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r106r15M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vE j48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxV AFwI0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x02 67AKxVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6x ACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E 87Iv67AKxVWxJVW8Jr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw2 8IcxkI7VAKI48JMxAqzxv262kKe7AKxVWUXVWUAwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCF I7km07C267AKxVWUXVWUAwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r 106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AK xVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7 xG6r1j6r1xMIIF0xvEx4A2jsIE14v26F4j6r4UJwCI42IY6I8E87Iv6xkF7I0E14v26r4U JVWxJrUvcSsGvfC2KfnxnUUI43ZEXa7IU1pVbDUUUUU== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769400126444343704?= X-GMAIL-MSGID: =?utf-8?q?1769400126444343704?= else is not generally useful after return Signed-off-by: Sui Jingfeng Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 1a5a2cd0d4ec..c18686f434d4 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -1150,8 +1150,8 @@ int drm_gem_pin(struct drm_gem_object *obj) { if (obj->funcs->pin) return obj->funcs->pin(obj); - else - return 0; + + return 0; } void drm_gem_unpin(struct drm_gem_object *obj)