Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1775614rwb; Fri, 23 Sep 2022 19:11:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6j5chlVAYJBGupGvWCWaqzUauCq8jWIbg5sGIALtR0Yz2vvjpcfQE+r5LrbmBbOQicB8Mk X-Received: by 2002:a17:907:d15:b0:781:e347:723 with SMTP id gn21-20020a1709070d1500b00781e3470723mr9254558ejc.723.1663985519286; Fri, 23 Sep 2022 19:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663985519; cv=none; d=google.com; s=arc-20160816; b=ntVFsQZdcIRQLxPtAVy5srbeYY5V47CVMil7uX1VrhXTM3fuRWj2eheRyIy9TeYfdH TLGy7LMdOrPn9yWHc8ZEIM5f5zdJXWUAngwF2LtOCXVuCXMyBzq4iCEQtsFX4yJjqCoK 0apJuprWTxo0ZprKFjlQjdP11HksK3hAonRZlh1eZt7cS61TRBDrnALKaAKWjDS6YWES oNHK94jEvCRj+/7A+0Bal2eNVAD093JM04w2iDFq2cunJFrzYugxJbd876hWnmpWpUcC FWnU9+mixYYu5vKyAmMeDAJ8cN+0ujQ+DXSoZy+iHLWh/upqyjRj5MUH+ZrfBBp0IZQP 6Ccw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mEOjjinJBS1qWUuCIBh6UgT1Mu6ffVpl8EY8geKQjdE=; b=feasOwmicQMWJeBLvZtU3/LbzwN2qk/THjJtMIisLEzUe142Vdzwo13toYTm9y1EwL 3GEkBWvVYZW1HzjMODvpdL+Am262lncBBmFRumPYWjFnC17AKOPa3t1s2lXdZhctRwQS ivFHOzB270JuQilRtxnBK3Fe8iH8U5hwVJa9OEJ30JWT7V9rA2/3gyb1ZqS0qSdGl/17 6aKEOs3u1b5CiHy3+OaGTDTTZV/Yz3fchFRiQl8SgXbYZSfBM+/Bz0VEC/KYwmI5uiip U/OboaV3Y2sUv2HJhriVkD6vwf78yXUQWwIywy1u4VK46sG38fkvqbanuuIEHDzrD401 Aj6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="EMH7sxk/"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020a05640250c800b00451e0d930dfsi10225070edb.497.2022.09.23.19.11.32; Fri, 23 Sep 2022 19:11:59 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b="EMH7sxk/"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233068AbiIXByB (ORCPT + 99 others); Fri, 23 Sep 2022 21:54:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233014AbiIXBxt (ORCPT ); Fri, 23 Sep 2022 21:53:49 -0400 Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CF73109508; Fri, 23 Sep 2022 18:53:48 -0700 (PDT) Received: by mail-qk1-x72b.google.com with SMTP id i3so1188116qkl.3; Fri, 23 Sep 2022 18:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=mEOjjinJBS1qWUuCIBh6UgT1Mu6ffVpl8EY8geKQjdE=; b=EMH7sxk/K27lQL6ZB5kjAnloR9i2W8DN1+MrlObnr2w/1Nn7QWI/vs/K4qQV9nuRjS 9WQPaTwntilZ91gEWZfzLgSWaTSoEzJUZz9JOIRPsKCEVheQjc2DVpRNT1+6w+P0G6AC 1os4ARjc1OxpAm1gnvqbSiiAp8qfo1FIwZIPbCQm88IYKVlgUN8YCht6uZPtGrmpjg3B eVnJGs+lTFUZEnRDX8gNugMGJViInBkhLMAUHqpSsAg/IiTpNBzx6NLT4fCKZE6HwtSr gdzopsNu611sZdca9+ZgrVd9PRzVZVJYQftlC+8TJPvZpFLDt2shXWe76OLecwJvXdeB ETzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=mEOjjinJBS1qWUuCIBh6UgT1Mu6ffVpl8EY8geKQjdE=; b=cs5cvsrtM+OCJyhjjegpIMhF8vxGKmcWIDgb5fD0OlWifEANYe3h0Wb5Z1qInynDfL 36USeek5u6ubDLiCOv9+I2M7rsgIW6Db9qVUj63wVM7RtgGvLSUtK/Cel0xWUTEtBFnF Hm8wILFQh056NK6vVzywC3/pDKo+RWrB/hTLo616EG2pK7DTeHPu3JrxcYY7jNTZ/X4C ps6UZP7V5Yjg79ArwoIw+mlRNNjfVEpZFht89aZZl7utDDDuYCQBrStfUjTM/eUcuG/n n1EmBlPw1l2+hhL+vZX/RIMxgORcSV/vKCkATZ1da0NqESVRt/2+CQ7VBrY4c3/XNURs tU0Q== X-Gm-Message-State: ACrzQf3KGHVpcaoLWS1tEcbeRvXC3w/Fd+eb72TN5eeuMJ/0H3ZiqptY 5uY5Kg7UQFhcmuNJ/hlQe5c= X-Received: by 2002:a37:65d0:0:b0:6cd:cce9:bd71 with SMTP id z199-20020a3765d0000000b006cdcce9bd71mr7590594qkb.353.1663984426818; Fri, 23 Sep 2022 18:53:46 -0700 (PDT) Received: from localhost (pool-173-73-95-180.washdc.fios.verizon.net. [173.73.95.180]) by smtp.gmail.com with UTF8SMTPSA id o13-20020a05620a2a0d00b006baef6daa45sm7291133qkp.119.2022.09.23.18.53.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Sep 2022 18:53:46 -0700 (PDT) From: Sean Anderson To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: Nick Bowler , Rolf Eike Beer , Zheyu Ma , linux-kernel@vger.kernel.org (open list), Sean Anderson Subject: [PATCH net-next v2 03/13] sunhme: forward the error code from pci_enable_device() Date: Fri, 23 Sep 2022 21:53:29 -0400 Message-Id: <20220924015339.1816744-4-seanga2@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220924015339.1816744-1-seanga2@gmail.com> References: <20220924015339.1816744-1-seanga2@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 From: Rolf Eike Beer This already returns a proper error value, so pass it to the caller. Signed-off-by: Rolf Eike Beer Signed-off-by: Sean Anderson --- Changes in v2: - Remove space after pci_enable_device drivers/net/ethernet/sun/sunhme.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c index 7340d0f2ef93..63a7cacd8286 100644 --- a/drivers/net/ethernet/sun/sunhme.c +++ b/drivers/net/ethernet/sun/sunhme.c @@ -2940,11 +2940,11 @@ static int happy_meal_pci_probe(struct pci_dev *pdev, strcpy(prom_name, "SUNW,hme"); #endif - err = -ENODEV; - - if (pci_enable_device(pdev)) + err = pci_enable_device(pdev); + if (err) goto err_out; pci_set_master(pdev); + err = -ENODEV; if (!strcmp(prom_name, "SUNW,qfe") || !strcmp(prom_name, "qfe")) { qp = quattro_pci_find(pdev); -- 2.37.1