Messages in this thread | | | From | Robert Jarzmik <> | Subject | Re: [PATCH 4/6] dma: pxa_dma: no need to check return value of debugfs_create functions | Date | Tue, 13 Aug 2019 23:21:04 +0200 |
| |
Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:
> On Sat, Aug 10, 2019 at 09:27:26PM +0200, Robert Jarzmik wrote: >> Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes: >> >> This is not strictly equivalent. >> Imagine that the debugfs_create_dir() fails and returns NULL : > How can that happen? Well in v5.0-rc1 that could happen ... unfortunately that's also the code I checked ...
>> - in the former case, neither "state", "descriptors" nor "requesters" would be >> created >> - in the new code, "state", "descriptors" nor "requesters" will be created in >> the debugfs root directory > > I agree, but debugfs_create_dir() does not return a NULL on an error > since many kernel releases. Neither can debugfs_create_file() so really > this test is not working at all as-is :) Ah yes, you're right, I wasn't aware of the debugfs changes ...
But checking a bit further, your original mail is 2 monthes old, and this patch was already merged in v5.2. I probably fell in a time-space anomaly, as I received this mail only a couple of days ago.
Have a nice day.
-- Robert
| |