From: Atul Kumar Pant <atulpant.linux@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: shubhrajyoti.datta@amd.com, sai.krishna.potthuri@amd.com,
james.morse@arm.com, mchehab@kernel.org, rric@kernel.org,
bp@alien8.de, tony.luck@intel.com, michal.simek@amd.com,
shuah@kernel.org, linux-kernel-mentees@lists.linuxfoundation.org,
linux-edac@vger.kernel.org
Subject: Re: [PATCH v1] drivers: edac: zynqmp_edac: Updates return value check
Date: Mon, 7 Aug 2023 08:01:04 +0530 [thread overview]
Message-ID: <20230807023104.GA4030@atom0118> (raw)
In-Reply-To: <2023080631-salon-banter-31b7@gregkh>
On Sun, Aug 06, 2023 at 03:37:01PM +0200, Greg KH wrote:
> On Sun, Aug 06, 2023 at 06:35:14PM +0530, Atul Kumar Pant wrote:
> > Updating the check of return value from edac_debugfs_create_dir
> > to use IS_ERR.
> >
> > Signed-off-by: Atul Kumar Pant <atulpant.linux@gmail.com>
> > ---
> > drivers/edac/zynqmp_edac.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/edac/zynqmp_edac.c b/drivers/edac/zynqmp_edac.c
> > index ac7d1e0b324c..cefbbafb945e 100644
> > --- a/drivers/edac/zynqmp_edac.c
> > +++ b/drivers/edac/zynqmp_edac.c
> > @@ -351,7 +351,7 @@ static void setup_debugfs(struct edac_device_ctl_info *edac_dev)
> > struct edac_priv *priv = edac_dev->pvt_info;
> >
> > priv->debugfs_dir = edac_debugfs_create_dir("ocm");
> > - if (!priv->debugfs_dir)
> > + if (IS_ERR(priv->debugfs_dir))
> > return;
>
> Again, not correct, sorry. Please do not make these types of changes.
>
> Why do you feel this is needed at all?
>
edac_debugfs_create_dir uses debugfs_create_dir that return ERR_PTR.
Hence to check the return value by this function I changed null
comparison with IS_ERR.
> thanks,
>
> greg k-h
next prev parent reply other threads:[~2023-08-07 2:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-06 13:05 [PATCH v1] drivers: edac: zynqmp_edac: Updates return value check Atul Kumar Pant
2023-08-06 13:37 ` Greg KH
2023-08-07 2:31 ` Atul Kumar Pant [this message]
2023-08-07 6:01 ` Greg KH
2023-08-15 20:35 ` Atul Kumar Pant
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=20230807023104.GA4030@atom0118 \
--to=atulpant.linux@gmail.com \
--cc=bp@alien8.de \
--cc=gregkh@linuxfoundation.org \
--cc=james.morse@arm.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=mchehab@kernel.org \
--cc=michal.simek@amd.com \
--cc=rric@kernel.org \
--cc=sai.krishna.potthuri@amd.com \
--cc=shuah@kernel.org \
--cc=shubhrajyoti.datta@amd.com \
--cc=tony.luck@intel.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).