dccp: fix auto-loading of dccp(_probe)
authorGerrit Renker <[email protected]>
Tue, 2 Feb 2010 20:16:56 +0000 (20:16 +0000)
committerDavid S. Miller <[email protected]>
Thu, 4 Feb 2010 03:00:31 +0000 (19:00 -0800)
This fixes commit (38ff3e6bb987ec583268da8eb22628293095d43b) ("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]>
net/dccp/probe.c

index bace1d8cbcfdad1cae8135ba1946ef2b548b6e61..f5b3464f124292ef26dcbaf7562355e7ab5d5a63 100644 (file)
@@ -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;