linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>, <michal.simek@xilinx.com>,
	<bp@alien8.de>, <mchehab@kernel.org>, <tony.luck@intel.com>,
	<james.morse@arm.com>, <rric@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-edac@vger.kernel.org>
Subject: Re: [PATCH] EDAC/synopsys: Fix wrong return value of mc_probe()
Date: Wed, 18 Nov 2020 14:57:47 +0100	[thread overview]
Message-ID: <89beec52-28db-bf76-79a5-da65ead85081@xilinx.com> (raw)
In-Reply-To: <20201116135810.3130845-1-zhangxiaoxu5@huawei.com>



On 16. 11. 20 14:58, Zhang Xiaoxu wrote:
> If create the inject sysfs file failed, we should return
> the error, rather than 0. Otherwise, there maybe error
> pointer access.
> 
> Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
> ---
>  drivers/edac/synopsys_edac.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c
> index 12211dc040e8..7e7146b22c16 100644
> --- a/drivers/edac/synopsys_edac.c
> +++ b/drivers/edac/synopsys_edac.c
> @@ -1344,7 +1344,8 @@ static int mc_probe(struct platform_device *pdev)
>  
>  #ifdef CONFIG_EDAC_DEBUG
>  	if (priv->p_data->quirks & DDR_ECC_DATA_POISON_SUPPORT) {
> -		if (edac_create_sysfs_attributes(mci)) {
> +		rc = edac_create_sysfs_attributes(mci);
> +		if (rc) {
>  			edac_printk(KERN_ERR, EDAC_MC,
>  					"Failed to create sysfs entries\n");
>  			goto free_edac_mc;
> 

Reviewed-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-11-18 13:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 13:58 [PATCH] EDAC/synopsys: Fix wrong return value of mc_probe() Zhang Xiaoxu
2020-11-18 13:57 ` Michal Simek [this message]
2020-11-18 18:36 ` Borislav Petkov

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=89beec52-28db-bf76-79a5-da65ead85081@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rric@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=zhangxiaoxu5@huawei.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).