From patchwork Mon Jan 25 08:13:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 12043549 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49091C433DB for ; Mon, 25 Jan 2021 14:10:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 097E3230FD for ; Mon, 25 Jan 2021 14:10:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729038AbhAYOHP (ORCPT ); Mon, 25 Jan 2021 09:07:15 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:55934 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729130AbhAYOGM (ORCPT ); Mon, 25 Jan 2021 09:06:12 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10P8A3qT158329; Mon, 25 Jan 2021 08:13:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=eukozOlwERUsiiJa50WK4bplUAZvd/sAVG0MWml20+c=; b=nZ2sSTREa8Kn2lgq0GxIwvhBsSMuH4N8SIOKZr0MnUiAAGSiQb5RB1BorrXPnMN77lMu 3KE74yZ12zqTk4W5LBoKDubIDfsBPvFiErfKMlWfR2QtIx1DxormZWsEaovlUpe2DxYq iGx7a2HfyQWinnJMw5rDQTQt5sR31OlVHVPPzuPPm5yUSw76grGltRGu0BxAsH5QPhNf 9LNsqnWl3dmGNCXpfFU0/XVyikQwzMszpvYOPTzsgVxYqHn1PJAi/h70Tw0E6Ax2pm4f OV6S1o8R2CdyWipPwmwJgCK5xdIdvKDWA8pZxZzjZUdpwq9AUcHPtarz4hv4eDblWBv9 sQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 368b7qm1qk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Jan 2021 08:13:34 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10P8BRSI003656; Mon, 25 Jan 2021 08:13:32 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 368wjpcucy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Jan 2021 08:13:32 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 10P8DV9k022050; Mon, 25 Jan 2021 08:13:31 GMT Received: from mwanda (/102.36.221.92) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 25 Jan 2021 00:13:30 -0800 Date: Mon, 25 Jan 2021 11:13:19 +0300 From: Dan Carpenter To: Vladimir Oltean Cc: Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, "David S. Miller" , Jakub Kicinski , Florian Fainelli , netdev@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 2/2 net-next] net: mscc: ocelot: fix error code in mscc_ocelot_probe() Message-ID: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email haha only kidding X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9874 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 adultscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101250048 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9874 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101250048 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Probe should return an error code if platform_get_irq_byname() fails but it returns success instead. Fixes: 6c30384eb1de ("net: mscc: ocelot: register devlink ports") Signed-off-by: Dan Carpenter --- drivers/net/ethernet/mscc/ocelot_vsc7514.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mscc/ocelot_vsc7514.c b/drivers/net/ethernet/mscc/ocelot_vsc7514.c index 2c82ffe2c611..7e4c9b255124 100644 --- a/drivers/net/ethernet/mscc/ocelot_vsc7514.c +++ b/drivers/net/ethernet/mscc/ocelot_vsc7514.c @@ -1307,8 +1307,10 @@ static int mscc_ocelot_probe(struct platform_device *pdev) goto out_free_devlink; irq_xtr = platform_get_irq_byname(pdev, "xtr"); - if (irq_xtr < 0) + if (irq_xtr < 0) { + err = irq_xtr; goto out_free_devlink; + } err = devm_request_threaded_irq(&pdev->dev, irq_xtr, NULL, ocelot_xtr_irq_handler, IRQF_ONESHOT,