From patchwork Tue Jan 9 09:26:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10151321 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 B47B1603ED for ; Tue, 9 Jan 2018 09:36:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A704B201B1 for ; Tue, 9 Jan 2018 09:36:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BB582885C; Tue, 9 Jan 2018 09:36:44 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no 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 E41A8201B1 for ; Tue, 9 Jan 2018 09:36:43 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 90CCC2675C7; Tue, 9 Jan 2018 10:27:04 +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 D2CAF2675C9; Tue, 9 Jan 2018 10:27:02 +0100 (CET) Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by alsa0.perex.cz (Postfix) with ESMTP id 857A726717C for ; Tue, 9 Jan 2018 10:26:57 +0100 (CET) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w099Qiio132013; Tue, 9 Jan 2018 09:26:55 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-2017-10-26; bh=06jOUYVGpEZMeaHkQoAWmLncqFWyM6VzqsY3c8Bdepo=; b=E4pN44MiNKalypzqZcaOzRCoBLabhFJteOqnk0wW3qrNB2On3eALEmPsCUDdaV7oLVE1 Pjr1yjLDr/qsmSDvqUpAaD/q1oE0UeujMtuYan7Aumd00fuC34MuE6iNaGeXuhKOFICb /zWg4SpBtXotm3PvfkrC+rG2IIU5/J28bODNrZbi2LbUM0M/NV0IV0tJssxdmL2X03ak Ro98lEvRoG+rOUnT5IYGFi47A6qYwfX+NRvddgLE7vmxtqMhcnCb81HmX/gDwDgvOp8C Eutvw/bO8sZwfHITTAcm9gjcovctIsa0Mqn+GRSYG5vq7AK0K41DPGfLcvVTpoWG/xEO nA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2fcsdn0cpn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 09 Jan 2018 09:26:55 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w099QqQV016478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 9 Jan 2018 09:26:52 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w099Qq9h013584; Tue, 9 Jan 2018 09:26:52 GMT Received: from mwanda (/197.157.34.162) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 09 Jan 2018 01:26:52 -0800 Date: Tue, 9 Jan 2018 12:26:44 +0300 From: Dan Carpenter To: Srinivas Kandagatla Message-ID: <20180109092644.wa4ubwxkcvc3lyza@mwanda> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180109092616.mfha2rs56oaxfjaz@mwanda> X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8768 signatures=668652 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=734 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801090133 Cc: Greg Kroah-Hartman , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH 2/2] slimbus: qcom-ctrl: Fix devm_ioremap_resource() error handling 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 devm_ioremap_resource() returns error pointers, not NULL so the check needs to be fixed. Fixes: ad7fcbc308b0 ("slimbus: qcom: Add Qualcomm Slimbus controller driver") Signed-off-by: Dan Carpenter diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c index 3ab59209cbdc..6bf95bf33299 100644 --- a/drivers/slimbus/qcom-ctrl.c +++ b/drivers/slimbus/qcom-ctrl.c @@ -528,9 +528,9 @@ static int qcom_slim_probe(struct platform_device *pdev) slim_mem = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ctrl"); ctrl->base = devm_ioremap_resource(ctrl->dev, slim_mem); - if (!ctrl->base) { + if (IS_ERR(ctrl->base)) { dev_err(&pdev->dev, "IOremap failed\n"); - return -ENOMEM; + return PTR_ERR(ctrl->base); } sctrl->set_laddr = qcom_set_laddr;