[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1146681.1568121518@turing-police>
Date: Tue, 10 Sep 2019 09:18:38 -0400
From: "Valdis Klētnieks" <valdis.kletnieks@...edu>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Colin Ian King <colin.king@...onical.com>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: staging: exfat: issue with FFS_MEDIAERR error return assignment
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*?
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists