From patchwork Sun Nov 5 10:45:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 161634 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2060429vqu; Sun, 5 Nov 2023 02:45:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IH83UqyNXsIABQXcl1BMzCS4bVmvJQiJLBQaV0wYJBdNe85n63wxxTvbY8/hugfKvUYzyoI X-Received: by 2002:a17:902:d2c1:b0:1cc:5ac3:853f with SMTP id n1-20020a170902d2c100b001cc5ac3853fmr22204685plc.23.1699181115351; Sun, 05 Nov 2023 02:45:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699181115; cv=none; d=google.com; s=arc-20160816; b=jSHnYEBrWdpMOXVI4rbkdKfiXIMCY8wyfOXKCRHYve4HpY1QLiO0t1R4OILbtyuyAU 2TwsQFjVdrTskPlF7LDxZdo3Dgl4G8QcoAu9l26WnPqwx9jFUsnO5Tk7lPFe52u/+FK5 KBH7Q1Z7fwgWXYKSqvd9PTsh9VBzw1SXkcg2xIoNYu28PbR3eDGvtCGK+1ih33nQkVQ1 3TOWRd2d/qERQDqQrVJiOmllLTLeTXvRh9XRurFQTBbdNW6l/VAWKJ34RIbNdtJWqTtm gC6lCWvPUaPibC15qqnFgvd8x2sSLYrEAnug9vp/q1GQDhkKuqIjJYSQaZl5B33SrrCe QVDA== 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:dkim-signature; bh=9b85zzslUSMT7EI5O+bY45Xi0oEa+NJhiBDoT4Py3kM=; fh=VaqYdMPeQsLQkgq8I8p7QT+GcDn1BNiibNHp218zxsY=; b=aXQkm1AwbPsgmxLIBm7HK3CGlnS2xHJfCQJ8pgwuMHu1K3lMpTYQEDsg8t5dZBsJXZ ilTVdUAf+sYv+tvlYg74cquZ60Z5SCtvky/F/Ii6pmmIr0aL3Ia3Ko/hZnX88VtZjw/k vXRPpeoXuiisQUq+Ug8fqRlA+aGeZKH6CuY/QjjlrcNofwisZJ6S/obeFj0Wj+6lIOOT JBzd1oWL+ShWUX8cCj1mAisF36xX4FIvNIvpeUUoPowYqyWJILPDRtUMKJVakusxteDe HNYusIm7JKS6antmocyB7ujWqeb8kXesdi+vFKTsULq6si0tB6iC05i7V9RlaqBerJX1 2y8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=YmYTctjN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id p1-20020a170902f08100b001b9ffda162csi5275232pla.441.2023.11.05.02.45.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 02:45:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=YmYTctjN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AC3CD804DDAD; Sun, 5 Nov 2023 02:45:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229644AbjKEKpN (ORCPT + 35 others); Sun, 5 Nov 2023 05:45:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjKEKpM (ORCPT ); Sun, 5 Nov 2023 05:45:12 -0500 Received: from smtp.smtpout.orange.fr (smtp-26.smtpout.orange.fr [80.12.242.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE522BF for ; Sun, 5 Nov 2023 02:45:08 -0800 (PST) Received: from pop-os.home ([86.243.2.178]) by smtp.orange.fr with ESMTPA id zacnqtRsUBKTszacoqttjX; Sun, 05 Nov 2023 11:45:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1699181105; bh=9b85zzslUSMT7EI5O+bY45Xi0oEa+NJhiBDoT4Py3kM=; h=From:To:Cc:Subject:Date; b=YmYTctjNTeAjCTVWG7IO4d3lf9haWgfL5VQ4C4gOCKG0x8gMkkvZd+AAz4r/pS+kH NG2sOv9e8AdfPl+V8G18Xddd6INznvqog217VqbEa7pGRdPLumwAS8vF9C1bOsP/oa bCmFMBWJGvcExWYthxeBXcWTJzp+fcJTBAuHPms3lebu1cAO519lgdnOiwZoHGV8lo ygJ0tCuXCPtweITlPklBINhK/FvcLEDawmOHgxaHPPhMpQiYMonDy0fWYeYsxm97GH xBy69tve1IfzWadKK4GYhliv3crg+5MeMzQba7V2EPudz2gl9hNUOsYPg1oDRhbqQa /laOR8v7O4+Tg== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 05 Nov 2023 11:45:05 +0100 X-ME-IP: 86.243.2.178 From: Christophe JAILLET To: rostedt@goodmis.org, gregkh@linuxfoundation.org, keescook@chromium.org, willy@infradead.org, senozhatsky@chromium.org Cc: list@mail.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] drm/i915/uc: Simplify an error handling path in uc_fw_rsa_data_create() Date: Sun, 5 Nov 2023 11:45:01 +0100 Message-Id: <0468666539199f4a440c0a60553b24832a50256a.1699180889.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 05 Nov 2023 02:45:13 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781720536814453523 X-GMAIL-MSGID: 1781720536814453523 i915_vma_unpin_and_release() is already called in the error handling path, there is no need to call it here as well. It is harmless, because the 2nd call will be a no-op, but it is cleaner and less verbose. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c index 362639162ed6..228c58f38489 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c @@ -1216,7 +1216,6 @@ static int uc_fw_rsa_data_create(struct intel_uc_fw *uc_fw) vaddr = i915_gem_object_pin_map_unlocked(vma->obj, intel_gt_coherent_map_type(gt, vma->obj, true)); if (IS_ERR(vaddr)) { - i915_vma_unpin_and_release(&vma, 0); err = PTR_ERR(vaddr); goto unpin_out; }