linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Colin Ian King <colin.king@canonical.com>,
	"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: staging: exfat: issue with FFS_MEDIAERR error return assignment
Date: Tue, 10 Sep 2019 09:18:38 -0400	[thread overview]
Message-ID: <1146681.1568121518@turing-police> (raw)
In-Reply-To: <20190910130934.GE15977@kadam>

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

On Tue, 10 Sep 2019 16:09:35 +0300, Dan Carpenter said:
> On Tue, Sep 10, 2019 at 01:58:35PM +0100, Colin Ian King wrote:
> > On 10/09/2019 13:44, Dan Carpenter wrote:
> > > On Fri, Aug 30, 2019 at 07:38:00PM +0100, Colin Ian King wrote:
> > >> Hi,
> > >>
> > >> Static analysis on exfat with Coverity has picked up an assignment of
> > >> FFS_MEDIAERR that gets over-written:
> > >>
> > >>
> > >> 1750        if (is_dir) {
> > >> 1751                if ((fid->dir.dir == p_fs->root_dir) &&
> > >> 1752                    (fid->entry == -1)) {
> > >> 1753                        if (p_fs->dev_ejected)
> > >
> > > Idealy we would have both a filename and a function name but this email
> > > doesn't have either so no one knows what code you are talking about.  :P
> >
> > Oops, my bad.
> >
> > drivers/staging/exfat/exfat_super.c ffsWriteStat()
>
> Yes, your solution is correct.

Actually, you can skip the else, because we initialized 'ret' at the start of the function.

The *bigger* issue - what should 'ret' be if dev_ejected is *false*?

[-- Attachment #2: Type: application/pgp-signature, Size: 832 bytes --]

      reply	other threads:[~2019-09-10 13:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 18:38 staging: exfat: issue with FFS_MEDIAERR error return assignment Colin Ian King
2019-09-10 12:44 ` Dan Carpenter
2019-09-10 12:58   ` Colin Ian King
2019-09-10 13:09     ` Dan Carpenter
2019-09-10 13:18       ` Valdis Klētnieks [this message]

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=1146681.1568121518@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=colin.king@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.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: 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).