From patchwork Thu Apr 27 15:13:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9703019 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 7B2E06032C for ; Thu, 27 Apr 2017 15:14:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81F7E262F2 for ; Thu, 27 Apr 2017 15:14:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7115C28652; Thu, 27 Apr 2017 15:14:02 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00D0A262F2 for ; Thu, 27 Apr 2017 15:14:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966256AbdD0POB (ORCPT ); Thu, 27 Apr 2017 11:14:01 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33759 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966066AbdD0POA (ORCPT ); Thu, 27 Apr 2017 11:14:00 -0400 Received: by mail-pf0-f194.google.com with SMTP id c198so11183716pfc.0 for ; Thu, 27 Apr 2017 08:14:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=98pJm0pGDFCCoxdeQsrWQAnW20aV96TgrR+K5yoIjRE=; b=DuXe/kIbl1fC74YWFGtRB1LqtIq1+gMLMbVLLGuaFbk0rfH5yjs1jtg/du7CkvqshX ntp6baI3PiaDX6xTXberFVQxfTXRtAdGMwte6A2EBmHEl/8Q8ahVs7G/7qQSvwv26dEz +PVV8IUpMtPnhniFEzyNn1fzt5XH+9/lDmQmR1nVQA1Jfrl/3lZm1DzYS9yn94LwSZZR VsrXgheNb+0W9uiOnCAk5P98HM9lIZr43YWoKvVd2i/G1RcLXMd4aqgCVLg+5l4ZmD9h F+LSES3DSEU7PrrbYxpA9kUn7L3CP6xzXLR5T7wRwkfLojH+RUjRHDpqLqsoBQdukLeT 9fgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=98pJm0pGDFCCoxdeQsrWQAnW20aV96TgrR+K5yoIjRE=; b=ko4U9E8SBvXnMg5DvGAI1FuCNNtmKN58tltDqm2/XHgzgKz9tbpYSlpGesbIx3D3Dq Y4kzmDLBTrVs7gPI5vJVhmwfKcpYpBwTlr1XiW1YDUyLwxycGBGYPWzSxkhh4Vtind6X rmEE+mgGOfVdKCZuL37Dh8FDZIh8AZGl8H1sJvUuiSMbhz30iun5DfXkNkX85Ikbzt/Q O67J/Pz//S+3C/0wJRYpIacETAnGdZJ5dqHHP6UqBqyb196nSfk1Ltp3GTvg9O2Rcyo+ eJ3KWlNErep7Ez3Feky62j/kYfV2jBoqu8MbNmdYLdadPW54bcvJ2RDT6ShzVMQgKA8b NYkA== X-Gm-Message-State: AN3rC/6Z2IwaOAFJOTB1wvh4MY2fPgZ0HOQV2ExMpa7Q5TypvRkfAsD2 dQ0/cy3i/Edmpg== X-Received: by 10.98.89.19 with SMTP id n19mr6575335pfb.230.1493306039631; Thu, 27 Apr 2017 08:13:59 -0700 (PDT) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id u85sm5731707pfg.64.2017.04.27.08.13.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Apr 2017 08:13:59 -0700 (PDT) From: Wei Yongjun To: Dmitry Torokhov , Marek Vasut , Ksenija Stanojevic , Lee Jones Cc: Wei Yongjun , linux-input@vger.kernel.org Subject: [PATCH -next v2] input: touchscreen: mxs-lradc: Fix return value check in mxs_lradc_ts_probe() Date: Thu, 27 Apr 2017 15:13:52 +0000 Message-Id: <20170427151352.23463-1-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170425062646.26043-1-weiyj.lk@gmail.com> References: <20170425062646.26043-1-weiyj.lk@gmail.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). Use devm_ioremap_resource() instead of devm_ioremap(). Signed-off-by: Wei Yongjun Acked-by: Dmitry Torokhov --- v1 -> v2: use devm_ioremap_resource() --- drivers/input/touchscreen/mxs-lradc-ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/touchscreen/mxs-lradc-ts.c b/drivers/input/touchscreen/mxs-lradc-ts.c index 4b4aebf..2c5076c 100644 --- a/drivers/input/touchscreen/mxs-lradc-ts.c +++ b/drivers/input/touchscreen/mxs-lradc-ts.c @@ -630,7 +630,7 @@ static int mxs_lradc_ts_probe(struct platform_device *pdev) spin_lock_init(&ts->lock); iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ts->base = devm_ioremap(dev, iores->start, resource_size(iores)); + ts->base = devm_ioremap_resource(dev, iores); if (IS_ERR(ts->base)) return PTR_ERR(ts->base);