Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1875749rwb; Sun, 18 Sep 2022 16:40:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6PVcYZ0SYvGYhuaX0k3HqcSyjhwKURgR7Ji9sXcJWDzBVxcDljdpIlcKxSCY9zjODifvRD X-Received: by 2002:a65:6e97:0:b0:439:e6a3:9f6d with SMTP id bm23-20020a656e97000000b00439e6a39f6dmr6042408pgb.369.1663544442854; Sun, 18 Sep 2022 16:40:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663544442; cv=none; d=google.com; s=arc-20160816; b=ganNuaom4aR7Gf4DPQGh5ZhbiSzpdmLpkVk/HOY3hMSXfE9VoHMkMHIQcad06If3tm c9NvAnZ21qbCNwWOZCua50I7UKyuEHdHESNoNDzKv/D0A7nQflgFoVxMWQwvrjkglQ0v XhrYWqzgMZ89UZC1CgCgb8nnISU6btIznulmB7lotsr2BveS2JByL3uh7aaKQaFxtRdF tYCNQOKAJ6WFnYlV83kN2ccnlZngTclvl4ohlc93EqGtD1BQH/XXViJQXbvUqKvfJ9CC GVR0MFwxHnTdfFdYmI/cEKA1SkbwYHgPkdqXRizKRr07D4jGIVrr3xEjAX1H+Xvc3LyO pIzg== 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=8EAn0cvdlfoIPExkywDlAWVYcfVTv9+DcRGm06t9Xe0=; b=BndUzJXWBCymswnlKgEzFd/YVJ3vsG8LJFU9F+AFVx8UzCvl69XbTKYOtnNQgDXsoa VBEbWzsxdD3qASUsU+NFBxYbxtVvCg+314njAHhVOVX6x9/BBAIX0NpVPSN64u5mpU8o L5QakR/35YRngZvJOhdtaIXxyP4RMOw88V4SAVpSaC+lYO62x8G3slPKp6DzsKGe7e4/ n/RzORlEPxhkP8HsO6gL4v7zwBDOVJuIj6YD+WFh7+t5rlBK5UkE/aDVO04cVRstPr7G PqfB0G2w821y/Rez99iUzMp0ZFiv6+QtIqskFyoh8gcQe3OxT2wx4/JizvBtt2/yvPAA rmig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=iW6tucCC; 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 l70-20020a638849000000b0042c6b7ed5a8si26782945pgd.596.2022.09.18.16.40.30; Sun, 18 Sep 2022 16:40:42 -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=iW6tucCC; 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 S229731AbiIRX0u (ORCPT + 99 others); Sun, 18 Sep 2022 19:26:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbiIRX0f (ORCPT ); Sun, 18 Sep 2022 19:26:35 -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 2863A15FCA; Sun, 18 Sep 2022 16:26:34 -0700 (PDT) Received: by mail-qk1-x72b.google.com with SMTP id g2so16668536qkk.1; Sun, 18 Sep 2022 16:26:34 -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=8EAn0cvdlfoIPExkywDlAWVYcfVTv9+DcRGm06t9Xe0=; b=iW6tucCCgZ5pZY72nI38Eu2AUCumKfVLIqoaDS2hX5URAg5jqvPLE9VLTtRdEYYd90 5w7Nfx+C9vgKRRN31+AbjvVFURwJJZzGHkGyEzLGu3/P6E5J1kEZXrz4yKSy2r/h5pt0 ++D1N3q1IR2bCmgPECOy3BvLE++gxTi/UB0GwznzP5YycquEdqfeQp5hNx5g988/g5XX lLxMwvPscvOylDyZ5H0NKJ5xACaNAN4ytNIElbWIoODOGBepbmlMDUuhy2T60mCjxPf0 G+QXiVu6IR0yIg8zNMW6cwUnHqUULCuKO/ZaQZXnygMkHZN7yhJ2U13BEYwBR0o0DkkA 5i6w== 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=8EAn0cvdlfoIPExkywDlAWVYcfVTv9+DcRGm06t9Xe0=; b=D21d07mm+f2JuVkHkvENWwxk+OYdbPcTkjCCCbdM7WXlRgr5W51J6z2kShWktb52Gp jRtb1iT9VQvKl2CTklrnKrV1fJ/m9uKpM0krZpn3lHi/us0gnICjTBOsuXdbn63U3YsN kpFI8qHiiYUT0MFVFKzT7HUz+A1wpnQmy44EGT7dVGHH1V0vXJaSJF+OISIyQq4h2qBs RuaMjzHMNOtAVf/etTgtNJZfdXATkisqVK06CeEkLsdpKQ6ec0TzCH+7zEczsDSVG/Jx uOKtylRTXKt8NRDUT6KtesKu+XU5zlLodo9ogTsv5RWrEnJnQXqtRPs7Hr9B1TpdZ56F RXwQ== X-Gm-Message-State: ACrzQf2xxG3Vey6flG7m5UrcOXrvBjHXJjMloOVwAfWmXTqGEo38J3PC TMIHuFAiYFcxD5njw4GDM3A= X-Received: by 2002:ae9:c105:0:b0:6ce:e3d8:73af with SMTP id z5-20020ae9c105000000b006cee3d873afmr5306664qki.105.1663543593335; Sun, 18 Sep 2022 16:26:33 -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 de42-20020a05620a372a00b006b945519488sm11637265qkb.88.2022.09.18.16.26.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Sep 2022 16:26:33 -0700 (PDT) From: Sean Anderson To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org (open list), Zheyu Ma , Nick Bowler , Rolf Eike Beer , Sean Anderson Subject: [PATCH net-next 03/13] sunhme: forward the error code from pci_enable_device() Date: Sun, 18 Sep 2022 19:26:16 -0400 Message-Id: <20220918232626.1601885-4-seanga2@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220918232626.1601885-1-seanga2@gmail.com> References: <20220918232626.1601885-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 --- drivers/net/ethernet/sun/sunhme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c index 7340d0f2ef93..1fc16801f520 100644 --- a/drivers/net/ethernet/sun/sunhme.c +++ b/drivers/net/ethernet/sun/sunhme.c @@ -2940,11 +2940,12 @@ static int happy_meal_pci_probe(struct pci_dev *pdev, strcpy(prom_name, "SUNW,hme"); #endif - err = -ENODEV; + err = pci_enable_device(pdev); - if (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