From patchwork Tue Jan 2 17:54:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 123189 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp9237848qgn; Tue, 2 Jan 2018 09:56:50 -0800 (PST) X-Google-Smtp-Source: ACJfBovgNqL86kXjSpxzZd28D5yAlRJI8YJxCH4uR7Hggm9k40IyPyX7oYf7qG8Or2UyQAMU2hEQ X-Received: by 10.84.133.1 with SMTP id 1mr13005plf.115.1514915810739; Tue, 02 Jan 2018 09:56:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514915810; cv=none; d=google.com; s=arc-20160816; b=Ph0GnwCnjzWzUr/2Ju5j9k8We2zTzng/OL9w89i6+2r8m8Q+zD/8absL9WSz32qccG CxL0PWLHqT+Jgt8bSMDsewhJdsBzsVDmbCJiosA1Lf06978q6nYriKDBze49mTsQrtwT QYB5XNa83vbw3YHTpoXNEaVO+8GuM4aps/kqKT+rG/CaQYaqcKBplVHDu6uKJ49Xy+dy vVbFHYDnV5dqJLpJbqDU3i08RYe0vnDOeYxUDhYtKuTM61A3rbTuWsO2hKzgRI5Yg572 oHtbsDo879Zg7fBbKzOBGjGmPLVKAExWm5wogD+raAuDiGXgq82nj87CDEy/z6zegZdm rMqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=4JpHUOSScOEZc1VZXOXgPRpJBh6F6eDF8cZV7v4hRUc=; b=BLcGHnnMy1XnFWYB4Nc0wb69ruUYRQB66DPitQOMzb4ClWn4HvqaGKLzNqTAN51Y+p aDQfkq55VVDNw5UlfkEmZMrbpooii7HYHV3ls+1rmAWEwbPXgS0WP4CDMLN2b9t+U/CG QfMt0Pziykh3wyqpVUZK3bEc/Mt/uLE4RO2D720W8TOnaMbxREBgAS1Z157PtmSSq4vS pGHYw7tgLHw7TcNlDeisJoJUeQCuLQ/Lj05WtRwBZ4My/LwhKeVTUBvLvVgiuG5yDkLV EM0aZpxsQPLMOk+VJQIhnaxEunnj9ySn2vh1qYxb9Bu/3JoTgbH1BLFTfAiM45t/M8WL BKzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fGde2jzm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n26si2027535pge.68.2018.01.02.09.56.50; Tue, 02 Jan 2018 09:56:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fGde2jzm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751396AbeABR4p (ORCPT + 28 others); Tue, 2 Jan 2018 12:56:45 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33809 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbeABR4k (ORCPT ); Tue, 2 Jan 2018 12:56:40 -0500 Received: by mail-wm0-f67.google.com with SMTP id y82so17162550wmg.1 for ; Tue, 02 Jan 2018 09:56:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4JpHUOSScOEZc1VZXOXgPRpJBh6F6eDF8cZV7v4hRUc=; b=fGde2jzmtQpb9EtpFGGo3rbQMglRHF4lWxXk07FJ4tTESZMTnhokskU8jEM/+Ld/Sw VkOr4C/KFmPCtcrCmbHiQ1o4/HFWzYFe8WnTw5m7YmCm5DbVf/Fp+q0Lhg0xq1Ktl8QB IsyO71RkAmaKm3QXeLraCIGH3OanW4OvwzX8E= 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; bh=4JpHUOSScOEZc1VZXOXgPRpJBh6F6eDF8cZV7v4hRUc=; b=BzkHf0WhfpnT+iST7ve5C7s9dUW2aEit9VnUp8hwOL31TjvgWE+Qgzzp6W5heHstTR KwRv4ub/vx15AD0vZkv0u5uHSB9FqrdNxIvRtGjTGORYdY+yUL9JBDBVvb5DxhkPIeqL bxlYnflzm9nEu9HeSvHhD7OoC4fOYNfZzZ2kDaJlDaMIm6WQ191ocv4DenmzN67850Ko Wpmu7YRiUch8txOewG7IxXPJt31EI7FLHMpV10rk8xM7Whm0iXVWV16gLyRKwPuOQ/A+ Szpb/KBMf1QjtdBGa1JkcH8rqhtE+mu+suUYvb9yJL904PMpKXjAMBlVRUS3amD9IOxD s9/w== X-Gm-Message-State: AKGB3mJ8U9g9Q/FAN1tJ4LvyAHM11c6udhMqVwWtvH+uW+VDLld8xWlG zQ3dOyLKm9X7NZxkCP1Jflxq5w== X-Received: by 10.28.19.199 with SMTP id 190mr33843715wmt.87.1514915799444; Tue, 02 Jan 2018 09:56:39 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id u54sm21895240wrf.77.2018.01.02.09.56.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Jan 2018 09:56:39 -0800 (PST) From: srinivas.kandagatla@linaro.org To: Greg Kroah-Hartman Cc: sdharia@codeaurora.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Wei Yongjun , Srinivas Kandagatla Subject: [PATCH 6/6] slimbus: qcom: Fix return value check in qcom_slim_probe() Date: Tue, 2 Jan 2018 17:54:24 +0000 Message-Id: <20180102175424.14391-7-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180102175424.14391-1-srinivas.kandagatla@linaro.org> References: <20180102175424.14391-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Yongjun In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/qcom-ctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.15.0 diff --git a/drivers/slimbus/qcom-ctrl.c b/drivers/slimbus/qcom-ctrl.c index 8d12baae4119..ffb46f915334 100644 --- a/drivers/slimbus/qcom-ctrl.c +++ b/drivers/slimbus/qcom-ctrl.c @@ -529,9 +529,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;