Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9123519pxu; Mon, 28 Dec 2020 07:12:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCsumpbpAhka4byUr/TaNoh8SX/c88R94z85XUt4KJpY7Ir1FQ4KysNupU3+EYQqGFZfGx X-Received: by 2002:a17:906:6d0b:: with SMTP id m11mr24601027ejr.230.1609168322620; Mon, 28 Dec 2020 07:12:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609168322; cv=none; d=google.com; s=arc-20160816; b=phi4FgZWESNBGtG1Av7yS0ydC7hD8oq8zeoO2DT/GATOwBwzNezzcXAFNr2AEN99W5 BsEHRgM127EVg0jCw6zl2GCUAirB8mpsCPmESG1tebsmVF/trNQ/+G4EuN/9wrs6z6rU aAX0fe6H7VffmEska9e5Hh44+QDNBWae8YPQ/5kQKLeOl2OZZ521nY7TCvfoohOR/LMx I1z2rc7d0hORiCf9QEWdZmfEPQPRmGOBREEg+MoPEL9HynhTy8DtzE6oN2ukayjfHhsk F778kVPvlVha/p3feONTXbeCNYPT8B5th6bCEy0TVYUY+79mZHBSiFZKmPseBaUhOyl/ /NTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kvDBPCTy20r6XqwwZsLVnaRHWS9Wate+djE/NKFOkOk=; b=YHF6MrwT27CKA9buZqReDvpwmPE0wOTYwq2xT7NnMxUTDGRz2cDCfhd/FQXrSK3JVI gPiAbf1WlwLCOMN9Y0dUJ1/SdnY9j0AJvs74Z72bg01lSc0r/IaVqoBue1xMwJvD5Hin NZCVK4L2PQpa1AeTCgy4/fRzi4Qhsu7ba3WEe2E2DpVATxwKHEySp8i7EChIpZZsCU7O X2E5iKTPDB4xO39BnAUdd/4HdGpRh/88FTVpv3ALdzWwRJJblX9p387/fMYgtm6FUR0f iP1QBQjllPiTnDIN5OOAdzzWAe1cTEe2MmFxvOAMktRgh3IGJbS3W6VXg8WLLs28CZkW atDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wJDjppGm; 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=pass (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 g19si20580806edf.599.2020.12.28.07.11.39; Mon, 28 Dec 2020 07:12:02 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=wJDjppGm; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439594AbgL1PJR (ORCPT + 99 others); Mon, 28 Dec 2020 10:09:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:41626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438534AbgL1OHs (ORCPT ); Mon, 28 Dec 2020 09:07:48 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B6F18208B3; Mon, 28 Dec 2020 14:07:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609164453; bh=B2qHW1c5dBIgnhi9gKVKLwS1LDNb43qomXavs767EDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wJDjppGmRP1n6NO9TK+y9zKwkmPc2H1mRBVWqOD4kCFa9y1SQOUM37zu9/p/qYj/o cz5p1501Vmm9LzFJUUewixIC1Wda7lZ9VaJlr6m809t4eKCzbBAZpWOBpocTqJPfTQ hBiMj2NC942qrW6f6GJlrr/JHM6Rmfawtjwqoy38= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wang Hai , Sasha Levin Subject: [PATCH 5.10 186/717] staging: mfd: hi6421-spmi-pmic: fix error return code in hi6421_spmi_pmic_probe() Date: Mon, 28 Dec 2020 13:43:04 +0100 Message-Id: <20201228125029.882112918@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wang Hai [ Upstream commit ba3e4a2a0b3c639d3835f2f1dce27d79576ae453 ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 4524ac56cdca ("staging: mfd: add a PMIC driver for HiSilicon 6421 SPMI version") Reported-by: Hulk Robot Signed-off-by: Wang Hai Link: https://lore.kernel.org/r/20201118103724.57451-1-wanghai38@huawei.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/hikey9xx/hi6421-spmi-pmic.c b/drivers/staging/hikey9xx/hi6421-spmi-pmic.c index 64b30d263c8d0..4f34a52829700 100644 --- a/drivers/staging/hikey9xx/hi6421-spmi-pmic.c +++ b/drivers/staging/hikey9xx/hi6421-spmi-pmic.c @@ -262,8 +262,10 @@ static int hi6421_spmi_pmic_probe(struct spmi_device *pdev) hi6421_spmi_pmic_irq_prc(pmic); pmic->irqs = devm_kzalloc(dev, HISI_IRQ_NUM * sizeof(int), GFP_KERNEL); - if (!pmic->irqs) + if (!pmic->irqs) { + ret = -ENOMEM; goto irq_malloc; + } pmic->domain = irq_domain_add_simple(np, HISI_IRQ_NUM, 0, &hi6421_spmi_domain_ops, pmic); -- 2.27.0