Skip to content

Commit

Permalink
dccp: fix auto-loading of dccp(_probe)
Browse files Browse the repository at this point in the history
This fixes commit (38ff3e6) ("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: Gerrit Renker <[email protected]>
Signed-off-by: Neil Horman <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Gerrit Renker authored and davem330 committed Feb 4, 2010
1 parent 8ed030d commit 1386be5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/dccp/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ static __init int dccpprobe_init(void)
if (!proc_net_fops_create(&init_net, procname, S_IRUSR, &dccpprobe_fops))
goto err0;

ret = try_then_request_module((register_jprobe(&dccp_send_probe) == 0),
"dccp");
try_then_request_module((ret = register_jprobe(&dccp_send_probe)) == 0,
"dccp");
if (ret)
goto err1;

Expand Down

0 comments on commit 1386be5

Please sign in to comment.