Re: [PATCH 01/22] USB: typec: tcpm: no need to check return value of debugfs_create_dir()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 30, 2018 at 06:42:49AM -0700, Guenter Roeck wrote:
> On 05/30/2018 03:36 AM, Greg Kroah-Hartman wrote:
> > On Wed, May 30, 2018 at 01:30:20PM +0300, Heikki Krogerus wrote:
> > > +Guenter
> > > 
> > > On Tue, May 29, 2018 at 05:30:46PM +0200, Greg Kroah-Hartman wrote:
> > > > When calling debugfs functions, there is no need to ever check the
> > > > return value.  The function can work or not, but the code logic should
> > > > never do something different based on this.
> > > > 
> > > > Clean up the tcpm.c code to not care about this, turns out no one was
> > > > even checking the return value of this function, so it didn't matter.
> > > > 
> > > > Note, I do not think this code can be removed in a running system, as
> > > > the debugfs root directory will stick around, that should be fixed
> > > > someday...
> > 
> > As Guenter pointed out to a different patch in this series, the code is
> > correct as-is, I read it wrong.  I'll delete this sentance from the
> > changelog when I apply it.
> > 
> Well, maybe I did not have enough coffee, but after looking into the code,
> I do think it is missing
> 	debugfs_remove(rootdir);
> in the removal path. See commit c9359f416 in linux-next. You had tried
> to replace that with debugfs_remove_recursive() in the fusb302 driver.

Yes, I think you are correct.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux