From patchwork Fri Aug 28 13:56:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 7091901 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A7E399F1C2 for ; Fri, 28 Aug 2015 13:56:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB0CE207F7 for ; Fri, 28 Aug 2015 13:56:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F14DD205F7 for ; Fri, 28 Aug 2015 13:56:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752470AbbH1N4F (ORCPT ); Fri, 28 Aug 2015 09:56:05 -0400 Received: from mail-la0-f53.google.com ([209.85.215.53]:32985 "EHLO mail-la0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752239AbbH1N4E (ORCPT ); Fri, 28 Aug 2015 09:56:04 -0400 Received: by laboe4 with SMTP id oe4so7043337lab.0 for ; Fri, 28 Aug 2015 06:56:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=3I9321qtJHEyzxA2vwQZBuP0SEFk7IVCD1tk89C6fM8=; b=M53P1MWTio3yFL0r44l9eQt/T2HEHJXO/7l8tYxHjmhQb+Q+T3+XWIRT69SZmc5UTY U1rXsog0aTX1PfMocsHclBDuUGdK8pCCE199IrJevwZSzmtMXz2an/pQ8OCC4I/eEZO5 qNpD68w8sprcQBP1kG/oaEb1eHA6hMEbUcm9ggPq/QCnTci+ZPQRJFXAoWGuJChVYHyM y4SUsRa+rY9oSAuptrkMtiBYPMkGLKqSCkZZMimvmodNoNLyPLqeQ//I/K1eLRrqozyX 2VNZ8MqFzfE7bNOT+ieVZctdi5RRqtTRU0y2FMWMoW/BshKgPS0ucPp6Uqjhlbbog3qn q3Pw== X-Gm-Message-State: ALoCoQlRkeDRomNclKns7yLcbqQ0xrwZtIgQKCo7Mx/BKrscyNmxdg+2gyIDyZdOw8L6TTU5Zv2o X-Received: by 10.112.118.19 with SMTP id ki19mr4919800lbb.108.1440770162402; Fri, 28 Aug 2015 06:56:02 -0700 (PDT) Received: from wasted.cogentembedded.com (ppp18-194.pppoe.mtu-net.ru. [81.195.18.194]) by smtp.gmail.com with ESMTPSA id r10sm1437914lar.2.2015.08.28.06.56.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Aug 2015 06:56:01 -0700 (PDT) From: Sergei Shtylyov To: netdev@vger.kernel.org Cc: linux-sh@vger.kernel.org, horms@verge.net.au Subject: [PATCH 2/2] sh_eth: propagate platform_get_irq() error upstream Date: Fri, 28 Aug 2015 16:56:01 +0300 Message-ID: <1774140.R12mtes975@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.9 (Linux/4.1.5-100.fc21.x86_64; KDE/4.14.9; x86_64; ; ) In-Reply-To: <9944836.IRPmWk4iN8@wasted.cogentembedded.com> References: <9944836.IRPmWk4iN8@wasted.cogentembedded.com> MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The driver overrides the error returned by platform_get_irq() with -ENODEV which e.g. precludes the deferred probing from working. Propagate the real error code to the driver core instead. Signed-off-by: Sergei Shtylyov Acked-by: Geert Uytterhoeven --- drivers/net/ethernet/renesas/sh_eth.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- net.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net/drivers/net/ethernet/renesas/sh_eth.c @@ -3089,10 +3089,8 @@ static int sh_eth_drv_probe(struct platf ndev->dma = -1; ret = platform_get_irq(pdev, 0); - if (ret < 0) { - ret = -ENODEV; + if (ret < 0) goto out_release; - } ndev->irq = ret; SET_NETDEV_DEV(ndev, &pdev->dev);