From patchwork Mon Nov 26 08:13:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10697759 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6544F15A7 for ; Mon, 26 Nov 2018 08:13:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5334F28793 for ; Mon, 26 Nov 2018 08:13:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 428F02881B; Mon, 26 Nov 2018 08:13:38 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY 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 5016828793 for ; Mon, 26 Nov 2018 08:13:37 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D34AC267A94; Mon, 26 Nov 2018 09:13:32 +0100 (CET) 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 4F505267A9B; Mon, 26 Nov 2018 09:13:30 +0100 (CET) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by alsa0.perex.cz (Postfix) with ESMTP id 1618A267847 for ; Mon, 26 Nov 2018 09:13:26 +0100 (CET) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wAQ83bix065175; Mon, 26 Nov 2018 08:13:25 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; s=corp-2018-07-02; bh=xw9jaBPR25drDQL4KwDgYYqJ2GPgFlMRTGx8c6rQ88M=; b=xkmk39tkCkjVO1gcVZ5QMDdRRoWNJtInaTRkofyEAmW1+uKITXuNCXIPEXnMXCwgtf/h 8GSxAx9D4Mxd+C467EuGn6zsIqzQBj8Y/Rn4nQRLs61w/C6xxh2+fqFWer8N0OYIb9z+ xQLqIfVCsr9/2H8is26Fv3VsXviqDrUKc69srhr1jZC1p17weY4wm5go5rV54Y7DIpUY DrgjpKN6dGRapTr0NiYDxXNUo6pS36jfbiRmyJdp3+g1XGTdl1RflKYqtOIyglu4Vupc gyHrEsfpGKHToGkkjtsaIgEa/S+dl5YRSqfFh4JHAyd23te9CoKxOr5AH/5rqGN4Ujra EA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2nxy9qv3ku-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Nov 2018 08:13:25 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wAQ8DO6p009916 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Nov 2018 08:13:24 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wAQ8DJ06006870; Mon, 26 Nov 2018 08:13:19 GMT Received: from kili.mountain (/41.202.241.51) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 26 Nov 2018 00:13:18 -0800 Date: Mon, 26 Nov 2018 11:13:07 +0300 From: Dan Carpenter To: Liam Girdwood , Vijendar Mukunda Message-ID: <20181126081307.qhbpwnlikquep476@kili.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170113 (1.7.2) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9088 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=880 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811260076 Cc: alsa-devel@alsa-project.org, Maruthi Srinivas Bayyavarapu , kernel-janitors@vger.kernel.org, Takashi Iwai , Sanju R Mehta , Mark Brown , Alex Deucher Subject: [alsa-devel] [PATCH] ASoC: amd: Fix a NULL vs IS_ERR() check in probe 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The platform_device_register_full() function doesn't return NULL, it returns error pointers. Fixes: 7894a7e7ea3d ("ASoC: amd: create ACP3x PCM platform device") Signed-off-by: Dan Carpenter --- sound/soc/amd/raven/pci-acp3x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c index c28457fd9b81..facec2472b34 100644 --- a/sound/soc/amd/raven/pci-acp3x.c +++ b/sound/soc/amd/raven/pci-acp3x.c @@ -97,10 +97,10 @@ static int snd_acp3x_probe(struct pci_dev *pci, pdevinfo.size_data = sizeof(irqflags); adata->pdev = platform_device_register_full(&pdevinfo); - if (!adata->pdev) { + if (IS_ERR(adata->pdev)) { dev_err(&pci->dev, "cannot register %s device\n", pdevinfo.name); - ret = -ENODEV; + ret = PTR_ERR(adata->pdev); goto unmap_mmio; } break;