Re: [PATCH 0/6] Return -ENODEV instead of -EFAULT on module-get failure
From: Cezary Rojewski
Date: Mon Jul 06 2026 - 09:14:22 EST
On 7/6/2026 2:31 PM, Bui Duc Phuc wrote:
Nah, typically I prefer not to mix the changes, let them remain atomic. Distinct error code is enough.Now, there is a benefit of having a different error code in
try_module_get() case: easier to find the offending bit when viewing
logs. All the functions in the area have rather low log-coverage so
distinct error codes help.
Regardless, as you mentioned, -EFAULT isn't exactly the right return
code either so the direction of the patchset is good.
Should I also add dev_err() at these paths, or is the distinct error
code enough for now?
In regard to the specific constant, I'd ask Takashi and Jaroslav what's their view on the subject. Perhaps -EPERM or -ENOENT are good candidates.