diff options
author | Markus Elfring <[email protected]> | 2024-10-23 16:54:59 +0200 |
---|---|---|
committer | Joel Granados <[email protected]> | 2024-10-31 11:39:55 +0100 |
commit | 9c738dae9534fbdf77c250132cba04e0822983b3 (patch) | |
tree | 7531f36d7f5d2929964b7bddc7647d2140361d50 /drivers/net/netdevsim/macsec.c | |
parent | a883f2efa625e05305aa9f6fc7ca3fae99105412 (diff) |
sysctl: Reduce dput(child) calls in proc_sys_fill_cache()
Replace two dput(child) calls with one that occurs immediately before
the IS_ERR evaluation. This transformation can be performed because
dput() gets called regardless of the value returned by IS_ERR(res).
This issue was transformed by using a script for the
semantic patch language like the following.
<SmPL>
@extended_adjustment@
expression e, f != { mutex_unlock }, x, y;
@@
+f(e);
if (...)
{
<+... when != \( e = x \| y(..., &e, ...) \)
- f(e);
...+>
}
-f(e);
</SmPL>
Signed-off-by: Markus Elfring <[email protected]>
Reviewed-by: Joel Granados <[email protected]>
Signed-off-by: Joel Granados <[email protected]>
Diffstat (limited to 'drivers/net/netdevsim/macsec.c')
0 files changed, 0 insertions, 0 deletions