From patchwork Tue Jun 6 08:21:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 103669 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3252835vqr; Tue, 6 Jun 2023 02:09:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7dXseX5vJN6ZiU1qLVsNvd0WymynYZLpo5xs0TI5vJElPyUMMOz8vC7oCAI8hPFBm7DqRv X-Received: by 2002:a05:6870:31d0:b0:187:e563:77b9 with SMTP id x16-20020a05687031d000b00187e56377b9mr1646998oac.45.1686042569812; Tue, 06 Jun 2023 02:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686042569; cv=none; d=google.com; s=arc-20160816; b=KoNud9WbFGGxbZnzFdCVOmYwO4dUN1/XJZvT8SGczxvB8VpyVAxCA6Tar/J7DhYvFf 3iOAJyZMm7PBQeF10v/Rw5KNuH7zjnyUcCki7ui4PDJpp0JiLeELyZdSnlJ5N8SVHP0Z TeFffmEMUe66LqBrm8UxEK8fY+1tWedpiYhnIlvNUIY+OHGQMN7QaiN0EpEtpWODl4Pe uPmNX4vu8VSZuvImqhfnnJup4mKOtAlecY0DIawvp4u6JtO2YjIGSYOFpht7iZgOLcll QfTbP9u1FI+ZagOkK2upWMWnhYuEH2so8Am3No/xfe2DPDikJEzZ7yy0wsL5XNI280KR RkFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=dkb7K4StnKyUjyVkKmBhJSVtp9R5+nxnmnxLzZaoi6w=; b=HM5nFxhFtQo+TpWEP41bkmtXJaGpE5abDqqHvDzApC8fffHG4k27+4bUbLoDjpq1BT uJ8RklrB5VoZnrrFh+xFrHs0Ww4s2MtwS7Oym++QPrE0t8Me1GtcVS7HztbfHm3AdtO6 C7bmpUaU9D1GSAMUAQqSsRQUhb8NiUiWIj202+sjni0opUbjjsZ3NULmoioEr4PCkeFa DqZxZZhHrUokrKFoZz0GpCvMKayF/sN2lxeOyoihn6TCx2ACGjGy3i/q8aK/jYOQy4Tu lXyIvDdkvHSn5HqyNT0I7FauvmaXH6dKYxyN5olW7ufKKF4mzCdKwLqUtAlMX+l5FA1W eStA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rhUgvkH5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s15-20020a63af4f000000b005429415454bsi6795585pgo.377.2023.06.06.02.09.18; Tue, 06 Jun 2023 02:09:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rhUgvkH5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S236224AbjFFIVd (ORCPT + 99 others); Tue, 6 Jun 2023 04:21:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236165AbjFFIV3 (ORCPT ); Tue, 6 Jun 2023 04:21:29 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C93CE8 for ; Tue, 6 Jun 2023 01:21:28 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f70fc4682aso50253695e9.1 for ; Tue, 06 Jun 2023 01:21:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686039687; x=1688631687; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=dkb7K4StnKyUjyVkKmBhJSVtp9R5+nxnmnxLzZaoi6w=; b=rhUgvkH5GQYV1LSKhWNnnqP5gDkgzCN0Uk7ZZu1BcKEJ0r8VW/+CMtHkEnScUr5r0w PHxBHuJZvNz4ebw+kqDIajqx820jmkb1x+sycocmoGs2S/qNdmThLgHver2tFCwsqkHi 5ZgCb4s6IjYhM7YBM+nv8AkyZ5C0CdDNuozNkgqzVl98vx472j28SDngUtDiOB4gUTC9 Fam2iP0hvtVHweUYpAbf2SvJr8bp29Pmp1eCSCNtzHTd0yNyt89T52Z9xuvZl59WOQ3o 16kPqyFLDX9iDIlKTZEny/V9tTM2OQzbwblpAVzwijWltjW1O+uKZSEiQ/rcCPwKFE7t xSgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686039687; x=1688631687; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dkb7K4StnKyUjyVkKmBhJSVtp9R5+nxnmnxLzZaoi6w=; b=ayFEKklvAw/GtNjVOqM12drfoMZPLw6mZ/XCTjdWqJIoKO6eKgG8vMqfpPY8O3ZMxx MbkLBvuLYAKHYoy6vAjOIFBaTpylkidjm5IX8sXuomDEKUyExOk7l4xKoTpA2YMNsvlX hl8GC4CRRp8bJix9uAPCkIk4Wi669wgMoer3aLCXl+CbZ5prOSrHiCttg9MocLlWL3Qk MGJgcWb/mKm3N2MHMXpXdQCl80TDEIiVP7deRch8AhN2DkZ96ykkCx4gAPzLTUU4IHuY Jjyk/ZftBKMlMpExuqpcL7xCHUdaSPOtyrN+vku/YOtbF7TbIDhxd6HbLVuyg8uVJQQf YNJQ== X-Gm-Message-State: AC+VfDxGBUc1Mi7v/uhCIJgoHb/vV9JXCBLqXy5lN+1Iysui9LuR9Jcg YG72kR7NXvYmSE/xvwIDMHhD5Q== X-Received: by 2002:adf:e5cf:0:b0:309:33c4:52e1 with SMTP id a15-20020adfe5cf000000b0030933c452e1mr1120986wrn.64.1686039687095; Tue, 06 Jun 2023 01:21:27 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id n2-20020a5d4c42000000b00306415ac69asm11781849wrt.15.2023.06.06.01.21.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 01:21:25 -0700 (PDT) Date: Tue, 6 Jun 2023 11:21:22 +0300 From: Dan Carpenter To: Konrad Dybcio Cc: Andy Gross , Bjorn Andersson , Manivannan Sadhasivam , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] soc: qcom: Fix a IS_ERR() vs NULL bug in probe Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767943773825407685?= X-GMAIL-MSGID: =?utf-8?q?1767943773825407685?= The devm_ioremap() function returns NULL on error, it never returns error pointers. Fixes: a77b2a0b1280 ("soc: qcom: Introduce RPM master stats driver") Signed-off-by: Dan Carpenter Reviewed-by: Konrad Dybcio --- drivers/soc/qcom/rpm_master_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/rpm_master_stats.c b/drivers/soc/qcom/rpm_master_stats.c index 6dd98b9f7129..9ca13bcf67d3 100644 --- a/drivers/soc/qcom/rpm_master_stats.c +++ b/drivers/soc/qcom/rpm_master_stats.c @@ -105,7 +105,7 @@ static int master_stats_probe(struct platform_device *pdev) } data[i].base = devm_ioremap(dev, res.start, resource_size(&res)); - if (IS_ERR(data[i].base)) { + if (!data[i].base) { debugfs_remove_recursive(root); return dev_err_probe(dev, -EINVAL, "Could not map the MSG RAM slice idx %d!\n", i);