Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2638935pxa; Mon, 17 Aug 2020 15:10:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLqYHktZ5maAvFN2ggRjB5IKGhPkOW+1AYLslLqOdqVXrHz3bO5b8Z0XAEhvH+f9njAivQ X-Received: by 2002:aa7:cdd0:: with SMTP id h16mr17060048edw.116.1597702208622; Mon, 17 Aug 2020 15:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597702208; cv=none; d=google.com; s=arc-20160816; b=hrh1cfS93w2qwhZk5vao4XfIs1DcfcvO7IF2Abg/Ce4Dt4nWzdkdxSusvst92U4JrT XlDCS6uFKSRVRt5EVb5FfFisy7vCVDGAEPdDRrllAGX42sZGe1MavuzHPl4MS8+WaLMR MRujMaSVzN9i2Z1kvdPBSLXbynNiui6ebL1LJQDaswF7/5tdiNbrRatK+VqbNXCXKMNf Dmwy5B7JYWiTzrrUHich23SCHdg7TVa71HZ9nOlF7SWCrb80rWl1tpyEq3OcjsTHlGIC 4OEsFpj+6NnZ6HU6QkvZwu5EDnFdQO8IwLE1NG72IDHrknQPV3Sk7SEqMTCaeJQN+aaC G85A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FuyScf14Z4MXwqjUG7KTJQ6XHbqwFXOnHCEbz3lezvw=; b=oX/goU0FxjJqrtIcOHMcVBB8Rmk0nJ+j24Ltxe9MPXmDaMrxkrRbZ7jM73rxNl3Jov LARYblVx337o2IGPl0hZzvpdZ2ehXE0U/SuBROfb/6bTqr0zc0WQttQIN1UCIpIFbVcH ETG1KRnRaQyYq1faYPLj7cPJsUs1fJuXH/hqkkN4DzKYAtFd1yYvyAp3oFLewK+5YAoV FFRP2G8b1svOMEqLWixKTiLNHSvgTKevkzhBmpAu6yAfYig3OCd4npEpKhTmCH1T9kCM 8jUqhGGF3vg2CcuKOz6g2iBOPR7EKROx2Ng3UcYlowSe18eyrowpGayAYmB9aKHUl0Od Gkeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=c1sjrypC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y22si12336083edv.326.2020.08.17.15.09.45; Mon, 17 Aug 2020 15:10:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=c1sjrypC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387873AbgHQQ3E (ORCPT + 99 others); Mon, 17 Aug 2020 12:29:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:39922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387910AbgHQPxP (ORCPT ); Mon, 17 Aug 2020 11:53:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6739F20888; Mon, 17 Aug 2020 15:53:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597679595; bh=5jBy9Sbw6TZGfmZD9NAK0ySdYA0L+padKW5xd+QSurk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c1sjrypCjeyUlOcIOkdMfTyRpOe6KG+WYI2w+IHqR01bY40is3A3DeIj3RHs4ovOv sM94DMENLx3pg7kMk8wA6rku8Fg4cC9KRznQ1qHpZxZWreXBZI2uEmednqNx2BQeyu giB7ZCGqe1ZpYWt8dMu2BThxE+fG9o0u3OWbsdMk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tiezhu Yang , Srinivas Kandagatla , Sasha Levin Subject: [PATCH 5.7 269/393] nvmem: sprd: Fix return value of sprd_efuse_probe() Date: Mon, 17 Aug 2020 17:15:19 +0200 Message-Id: <20200817143832.668352549@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tiezhu Yang [ Upstream commit bcd14bb7a68520bf88e45e91d354e43535624f82 ] When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Fixes: 096030e7f449 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support") Signed-off-by: Tiezhu Yang Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/nvmem/sprd-efuse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nvmem/sprd-efuse.c b/drivers/nvmem/sprd-efuse.c index 925feb21d5adf..59523245db8a5 100644 --- a/drivers/nvmem/sprd-efuse.c +++ b/drivers/nvmem/sprd-efuse.c @@ -378,8 +378,8 @@ static int sprd_efuse_probe(struct platform_device *pdev) return -ENOMEM; efuse->base = devm_platform_ioremap_resource(pdev, 0); - if (!efuse->base) - return -ENOMEM; + if (IS_ERR(efuse->base)) + return PTR_ERR(efuse->base); ret = of_hwspin_lock_get_id(np, 0); if (ret < 0) { -- 2.25.1