lkml.org 
[lkml]   [2023]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drivers: regulator: core: remove return value check of `regulator_init`
On Sun, Apr 23, 2023 at 08:27:31PM +0800, Yuchen Yang wrote:
> Smatch complains that:
> regulator_init() warn: 'debugfs_root' is an error pointer or valid
>
> According to the documentation of the debugfs_create_dir() function,
> there is no need to check the return value of this function.
> Just delete the dead code.

This is very much a taste and use case question, you can't just delete
error checks without thought.

> Fixes: 247514344492 ("regulator: Remove ifdefs for debugfs code")

Don't just throw random Fixes tags on things :(
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-04-24 13:56    [W:0.029 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site