From patchwork Wed Apr 8 11:20:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 6178751 Return-Path: X-Original-To: patchwork-alsa-devel@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 00B1B9F2E9 for ; Wed, 8 Apr 2015 11:25:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 405812034F for ; Wed, 8 Apr 2015 11:25:34 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 1846A2012D for ; Wed, 8 Apr 2015 11:25:33 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 162B12652F8; Wed, 8 Apr 2015 13:25:31 +0200 (CEST) Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 4E6362652F8; Wed, 8 Apr 2015 13:22:38 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0D9DB265310; Wed, 8 Apr 2015 13:22:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NO_DNS_FOR_FROM, RCVD_IN_SORBS_WEB, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by alsa0.perex.cz (Postfix) with ESMTP id D01932652F1 for ; Wed, 8 Apr 2015 13:21:37 +0200 (CEST) Received: by pdea3 with SMTP id a3so112324146pde.3 for ; Wed, 08 Apr 2015 04:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+g/CC6aSWuSczkOYCq2rduHTPwD7gtJewJ4bsfveO8o=; b=dcmOE+OkpGlowRmJuXg2aGl0HUK495QQC3gTApgxfHMJZ517/GldF5gr2N384HU1Kt 7PF9MQiLl8swlqaUoQKuA5CRpr8RXjjerXeGCTKMUiSimK70BvdgXAjwlBPbOFvyUa8J rqQ400WntsNKCCwmRXQpfXEbEUxTgWza4W7ZZ5RtJcjoq9bcDVP+4WiOonogOqa/tQlo ySyCsgV+DljfhrJyCddS5weKwg3zcQU4mI7GS8hZUwnrALbB1finmL0VJcKcEsAMz1NV rDFTsGrhPCxY+dyvmccfbQ88ABZQUjMQqYoZvR6gFa/rmgmWyFYN/Gxn9ddgYusYKCSV LjYw== X-Received: by 10.70.96.65 with SMTP id dq1mr26935266pdb.79.1428492097212; Wed, 08 Apr 2015 04:21:37 -0700 (PDT) Received: from localhost.localdomain ([122.169.147.27]) by mx.google.com with ESMTPSA id og11sm10973411pdb.91.2015.04.08.04.21.31 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 08 Apr 2015 04:21:36 -0700 (PDT) From: Sudip Mukherjee To: Arnd Bergmann , Greg Kroah-Hartman , Jean Delvare , Wolfram Sang , Rodolfo Giometti , "James E.J. Bottomley" , Mark Brown , Willy Tarreau , Jaroslav Kysela , Takashi Iwai Date: Wed, 8 Apr 2015 16:50:32 +0530 Message-Id: <1428492040-5581-7-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1428492040-5581-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1428492040-5581-1-git-send-email-sudipm.mukherjee@gmail.com> Cc: devel@driverdev.osuosl.org, alsa-devel@alsa-project.org, linux-scsi@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, linux-i2c@vger.kernel.org, Sudip Mukherjee Subject: [alsa-devel] [PATCH 06/14] spi: butterfly: return proper error values from attach X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP now that we are monitoring the return value from attach, make the required changes to return proper value from its attach function. Signed-off-by: Sudip Mukherjee --- drivers/spi/spi-butterfly.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-butterfly.c b/drivers/spi/spi-butterfly.c index 9a95862..7df16c8 100644 --- a/drivers/spi/spi-butterfly.c +++ b/drivers/spi/spi-butterfly.c @@ -190,7 +190,7 @@ static struct flash_platform_data flash = { /* REVISIT remove this ugly global and its "only one" limitation */ static struct butterfly *butterfly; -static void butterfly_attach(struct parport *p) +static int butterfly_attach(struct parport *p) { struct pardevice *pd; int status; @@ -199,7 +199,7 @@ static void butterfly_attach(struct parport *p) struct device *dev = p->physport->dev; if (butterfly || !dev) - return; + return -ENODEV; /* REVISIT: this just _assumes_ a butterfly is there ... no probe, * and no way to be selective about what it binds to. @@ -287,7 +287,7 @@ static void butterfly_attach(struct parport *p) pr_info("%s: AVR Butterfly\n", p->name); butterfly = pp; - return; + return 0; clean2: /* turn off VCC */ @@ -300,6 +300,7 @@ clean0: (void) spi_master_put(pp->bitbang.master); done: pr_debug("%s: butterfly probe, fail %d\n", p->name, status); + return status; } static void butterfly_detach(struct parport *p)