Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3527748pxf; Mon, 15 Mar 2021 11:33:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhSdaSkPAFFIAv0slG7lau0m33fbIH9AVTHquBMU/lZ7nNcp0sg6FzDpf1YONQN2URzzrn X-Received: by 2002:a17:906:3883:: with SMTP id q3mr24893269ejd.160.1615833184214; Mon, 15 Mar 2021 11:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833184; cv=none; d=google.com; s=arc-20160816; b=hos7XCZmAXVpQmQnyrFsyQnyGksJLOObwuzO8OdjLLBdcJR2mfZyNNVAUPfeeH9XPU Sbye2UwI2PmFN7CubwyKVg5BqUnyK+1dKZw8KAmubQk6bIMLvTVkUxul7BJiaQlpGUi3 U0W6yKlywecXl6oBlGBP0eyXiuShk+qBCPq2uOilnLc7UfYSEYMstAqNSdomYwnb/siz lTHihHORr2+4bN1Yih7Nonz+JwNXcgY+BWgL3/lwGxlu1WmwlPt9EYpnVfv/yTAWY+Qb JkpvjhHl0GGG7dM3XHIENIs6Fs7F6YGhWjYD1wqjwXhBLipUjhs8z0EqiB819+dDuH7X 60iA== 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=FO/t+9i69JBf0rSe+PbmyTdlHmd+Mb80JwfsAtat47s=; b=lGJIF03YSaSTRxS3pD8zaXFU78ot9tQIDG3qDhIrTsJMymweT8Vj9VXf5KAcQ/WRgq rYi+zebqqS5LEF1RqkasaQk5OnXmBfmPlIKc0i8D5mSRBtCyxmuMaKh5I+guwsEztRyL nD4w3zcJdHzKi/YyK/c8Gw5GnKpX0iVrk/fT7ejqnv7v7ZF7pu3S6Cwver5FpijWiRmI R2AzdMkEIZ90vE8cTMsqIDB6elRSYTJH+n3sKOC0JPhuZELW1vf7Sy1frvFnplNK3wck qesaVKD4mTv+C8Y1Hu1Iu8baU/EEUeZOTKmq504TJyeG5FrFmo86CGCq3FdIHMuc23yf IyZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0uzwfGWy; 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 j7si11651273ejm.408.2021.03.15.11.32.42; Mon, 15 Mar 2021 11:33:04 -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=@linuxfoundation.org header.s=korg header.b=0uzwfGWy; 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 S237720AbhCOOnP (ORCPT + 99 others); Mon, 15 Mar 2021 10:43:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:49768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234478AbhCOOD0 (ORCPT ); Mon, 15 Mar 2021 10:03:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EBB2664EED; Mon, 15 Mar 2021 14:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615817006; bh=+vUotQlb5TcoJTD2VHMdAPOXyqzULayMhz7o7251Ejg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0uzwfGWy+T3FsBJEm7Z0UUJWyy0iFMGzKVYcc5C10pJAXxu/oxk/T960y6ute0khY owRRoK8c+n8VZqHo+/NUKhSi2ZZ/f7BNyXT4CST/xOBCHLOZ8WJPXCsOsDBvoSgBNL wNUaK32IZCIve47gEuUccdYbby4oF4XCQiNnQOH8= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wei Yongjun , Will Deacon , Sasha Levin Subject: [PATCH 5.11 256/306] perf/arm_dmc620_pmu: Fix error return code in dmc620_pmu_device_probe() Date: Mon, 15 Mar 2021 14:55:19 +0100 Message-Id: <20210315135516.295499846@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@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: Greg Kroah-Hartman From: Wei Yongjun [ Upstream commit c8e3866836528a4ba3b0535834f03768d74f7d8e ] Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: 53c218da220c ("driver/perf: Add PMU driver for the ARM DMC-620 memory controller") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210312080421.277562-1-weiyongjun1@huawei.com Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- drivers/perf/arm_dmc620_pmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/perf/arm_dmc620_pmu.c b/drivers/perf/arm_dmc620_pmu.c index 004930eb4bbb..b50b47f1a0d9 100644 --- a/drivers/perf/arm_dmc620_pmu.c +++ b/drivers/perf/arm_dmc620_pmu.c @@ -681,6 +681,7 @@ static int dmc620_pmu_device_probe(struct platform_device *pdev) if (!name) { dev_err(&pdev->dev, "Create name failed, PMU @%pa\n", &res->start); + ret = -ENOMEM; goto out_teardown_dev; } -- 2.30.1