Commit 1386be55 authored by Gerrit Renker's avatar Gerrit Renker Committed by David S. Miller

dccp: fix auto-loading of dccp(_probe)

This fixes commit (38ff3e6b) ("dccp_probe:
Fix module load dependencies between dccp and dccp_probe", from 15 Jan).

It fixes the construction of the first argument of try_then_request_module(),
where only valid return codes from the first argument should be returned.

What we do now is assign the result of register_jprobe() to ret, without
the side effect of the comparison.
Acked-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8ed030dd
...@@ -161,7 +161,7 @@ static __init int dccpprobe_init(void) ...@@ -161,7 +161,7 @@ static __init int dccpprobe_init(void)
if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops)) if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops))
goto err0; goto err0;
ret = try_then_request_module((register_jprobe(&dccp_send_probe) == 0), try_then_request_module((ret = register_jprobe(&dccp_send_probe)) == 0,
"dccp"); "dccp");
if (ret) if (ret)
goto err1; goto err1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment