diff options
| author | Andy Shevchenko <[email protected]> | 2023-08-28 14:58:24 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-09-12 13:54:44 +0000 |
| commit | fd6f7ad2fd4d53fa14f4fd190f9b05d043973892 (patch) | |
| tree | 148c2f6ab0d6b4080ecbff4fda002ffc9defab3b /drivers/cdx/controller/cdx_controller.c | |
| parent | Linux 6.6-rc1 (diff) | |
| download | kernel-fd6f7ad2fd4d53fa14f4fd190f9b05d043973892.tar.gz kernel-fd6f7ad2fd4d53fa14f4fd190f9b05d043973892.zip | |
driver core: return an error when dev_set_name() hasn't happened
The commit d21fdd07cea4 ("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: d21fdd07cea4 ("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]>
Diffstat (limited to 'drivers/cdx/controller/cdx_controller.c')
0 files changed, 0 insertions, 0 deletions
