From patchwork Fri Jun 9 20:49:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 9779335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 78A05603F1 for ; Fri, 9 Jun 2017 20:57:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B5C72870E for ; Fri, 9 Jun 2017 20:57:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F61C2870B; Fri, 9 Jun 2017 20:57:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C29EA2870E for ; Fri, 9 Jun 2017 20:57:55 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 547C12676D8; Fri, 9 Jun 2017 22:50:09 +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 389DF2676DA; Fri, 9 Jun 2017 22:50:08 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by alsa0.perex.cz (Postfix) with ESMTP id C229F2676D7 for ; Fri, 9 Jun 2017 22:49:59 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 09 Jun 2017 13:49:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.39,319,1493708400"; d="scan'208"; a="1180536592" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 09 Jun 2017 13:49:56 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id C09F7185; Fri, 9 Jun 2017 23:49:54 +0300 (EEST) From: Andy Shevchenko To: Bard Liao , Oder Chiou , Liam Girdwood , Mark Brown , alsa-devel@alsa-project.org, John Keeping Date: Fri, 9 Jun 2017 23:49:54 +0300 Message-Id: <20170609204954.40310-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170609204954.40310-1-andriy.shevchenko@linux.intel.com> References: <20170609204954.40310-1-andriy.shevchenko@linux.intel.com> Cc: Andy Shevchenko Subject: [alsa-devel] [PATCH v1 3/3] ASoC: Intel: bdw-rt5677: Switch to devm_acpi_dev_add_driver_gpios() 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 Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify error path and fix potentially wrong assingment if ->probe() fails. Signed-off-by: Andy Shevchenko --- sound/soc/intel/boards/bdw-rt5677.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/intel/boards/bdw-rt5677.c b/sound/soc/intel/boards/bdw-rt5677.c index e3aa32c2546b..dc8d18837109 100644 --- a/sound/soc/intel/boards/bdw-rt5677.c +++ b/sound/soc/intel/boards/bdw-rt5677.c @@ -347,8 +347,7 @@ static int bdw_rt5677_probe(struct platform_device *pdev) return -ENOMEM; } - ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev), - bdw_rt5677_gpios); + ret = devm_acpi_dev_add_driver_gpios(&pdev->dev, bdw_rt5677_gpios); if (ret) dev_warn(&pdev->dev, "Failed to add driver gpios\n");