From patchwork Mon May 29 06:25:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 686770 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6956C77B7A for ; Mon, 29 May 2023 06:26:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231552AbjE2G0D (ORCPT ); Mon, 29 May 2023 02:26:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231612AbjE2G0B (ORCPT ); Mon, 29 May 2023 02:26:01 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65C9819C; Sun, 28 May 2023 23:25:29 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4eed764a10cso3043213e87.0; Sun, 28 May 2023 23:25:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685341520; x=1687933520; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=C8+bnKjskXykSg/iKyM4tx22OBuA1gQnjvmBSIg+LQg=; b=fFliZVkMY6bLJAuYH+zFK4+JAx6PcjcFknIiq781O2oY3I435SWATGl1m+BLfl752X 9VF5qvU7gxfrJcCYmb0eAg3X65C+BMJ3nFUxTBQ0/y7jHU9eQ+9tbfJbLNrfDTBwom73 tQ00BJhN236S6OG3HE2gbGrJqlo6ls+rTxX7WUcgwmL/An/DgfvtOswQbaWmjbRxgJJd dr0+1qJ+ZTSsgElhFGpPQ/0V+7uEz9iu9rxuT0m81vFZzJ9NcoAa0ZItX4q4fvbwHX4O SCCYEQsoM0lVFBLlzpYs2CaibCeIqOOYaOj2PJPNS1znR8dAxIHFdobqPTvcE3rtDhDr 7eYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685341520; x=1687933520; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=C8+bnKjskXykSg/iKyM4tx22OBuA1gQnjvmBSIg+LQg=; b=I9yhLMOZUDVehKqgErP+HKR9ptEVmAEmfJarvkBbpi9y3Kcb4FyLXGnAVq7sNp/a/w M1489/diKS6uSZO71GtDWVBsjVbbZNYm/dpQ9dtbRPt/Gc0TNTXRrqmgH4HVtjcdiXwP zwF5xV+yLzoq3fbflTVGpDxb8CMtCDb1u/OF04EzvaYpfQPCt/ne6wBQJnXKB5cgCVpw /BfsHx0DmebcOs20+y6kX1myZMcqK7gJKiVM51pQQuSfXz4txMCszTYFRomA4Mhfr2yp XPYYl4QnZGb5+2xps2atHjtzqzboibqGJ6XHz3GXcJNiDBUgRSWycuJD6PmWG1WOoMPd 87pg== X-Gm-Message-State: AC+VfDztJ4/tdjG2aPPeZWt3LJacl3tWD1Xh5JDEMj58Q2I1d/+sKhpe i6Cct/TCnnM1G5VhCiMZo5s= X-Google-Smtp-Source: ACHHUZ6Xj6UKjjPlJgrfE9uMHkKDWTfWA5sR45BQylbXf8Ay6rkSnz/XTqU+Q3yir0vd0i1zrhMoUw== X-Received: by 2002:ac2:4477:0:b0:4f5:76a:2033 with SMTP id y23-20020ac24477000000b004f5076a2033mr46640lfl.25.1685341520423; Sun, 28 May 2023 23:25:20 -0700 (PDT) Received: from fedora (62-78-225-252.bb.dnainternet.fi. [62.78.225.252]) by smtp.gmail.com with ESMTPSA id c18-20020a197612000000b004efd3c2b746sm1857330lff.162.2023.05.28.23.25.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 23:25:19 -0700 (PDT) Date: Mon, 29 May 2023 09:25:15 +0300 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J. Wysocki" , Wolfram Sang , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Andreas Klinger , Marcin Wojtas , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan =?iso-8859-1?q?Neusch=E4fer?= , Linus Walleij , Paul Cercueil , Akhil R , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-iio@vger.kernel.org, netdev@vger.kernel.org, openbmc@lists.ozlabs.org, linux-gpio@vger.kernel.org, linux-mips@vger.kernel.org Subject: [PATCH v7 9/9] net-next: mvpp2: don't shadow error Message-ID: <16d2b244566d4993c8fb26e1e2fbd178f46587f4.1685340157.git.mazziesaccount@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Do not overwrite error from lower layers but return the actual error to user if obtaining an IRQ fails. Suggested-by: Andy Shevchenko Suggested-by: Jonathan Cameron Signed-off-by: Matti Vaittinen --- Revision history: v7: New patch drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index 5b987af306a5..57cacdcd49ea 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -5830,13 +5830,13 @@ static int mvpp2_multi_queue_vectors_init(struct mvpp2_port *port, } if (port_node) - v->irq = of_irq_get_byname(port_node, irqname); + ret = of_irq_get_byname(port_node, irqname); else - v->irq = fwnode_irq_get(port->fwnode, i); - if (v->irq < 0) { - ret = -EINVAL; + ret = fwnode_irq_get(port->fwnode, i); + if (ret < 0) goto err; - } + + v->irq = ret; netif_napi_add(port->dev, &v->napi, mvpp2_poll); }