From: 'Wei Yongjun <weiyongjun1@huawei.com> To: <weiyongjun1@huawei.com>, Will Deacon <will@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Tuan Phan <tuanphan@os.amperecomputing.com> Cc: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>, Hulk Robot <hulkci@huawei.com> Subject: [PATCH -next] perf/arm_dmc620_pmu: Fix error return code in dmc620_pmu_device_probe() Date: Fri, 12 Mar 2021 08:04:21 +0000 [thread overview] Message-ID: <20210312080421.277562-1-weiyongjun1@huawei.com> (raw) From: Wei Yongjun <weiyongjun1@huawei.com> 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 <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> --- 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 66ad5b3ece19..f2a85500258d 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; }
WARNING: multiple messages have this Message-ID (diff)
From: 'Wei Yongjun <weiyongjun1@huawei.com> To: <weiyongjun1@huawei.com>, Will Deacon <will@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Tuan Phan <tuanphan@os.amperecomputing.com> Cc: <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>, Hulk Robot <hulkci@huawei.com> Subject: [PATCH -next] perf/arm_dmc620_pmu: Fix error return code in dmc620_pmu_device_probe() Date: Fri, 12 Mar 2021 08:04:21 +0000 [thread overview] Message-ID: <20210312080421.277562-1-weiyongjun1@huawei.com> (raw) From: Wei Yongjun <weiyongjun1@huawei.com> 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 <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> --- 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 66ad5b3ece19..f2a85500258d 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; } _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-03-12 7:57 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-12 8:04 'Wei Yongjun [this message] 2021-03-12 8:04 ` [PATCH -next] perf/arm_dmc620_pmu: Fix error return code in dmc620_pmu_device_probe() 'Wei Yongjun 2021-03-12 11:44 ` Will Deacon 2021-03-12 11:44 ` Will Deacon
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210312080421.277562-1-weiyongjun1@huawei.com \ --to=weiyongjun1@huawei.com \ --cc=hulkci@huawei.com \ --cc=kernel-janitors@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mark.rutland@arm.com \ --cc=tuanphan@os.amperecomputing.com \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.