mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
The commitd21fdd07ce("driver core: Return proper error code when dev_set_name() fails") rewrote the logic of handling the dev_set_name() error codes, but missed the point that initially set error value to -EINVAL might be rewritten and hence the error path can't be triggered at some circumstances. To fix this, make sure that error variable is set to -EINVAL when other conditionals are false. Reported-by: [email protected] Fixes:d21fdd07ce("driver core: Return proper error code when dev_set_name() fails") Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>