]> git.baikalelectronics.ru Git - kernel.git/commit
dccp: Fix compile warning in probe code.
authorDavid S. Miller <davem@davemloft.net>
Thu, 1 Dec 2011 19:45:49 +0000 (14:45 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Dec 2011 19:45:49 +0000 (14:45 -0500)
commitd4ed1ec26d3ab7c1f54e487add3ba2613639dcef
tree59bebd70ee13d33a7ffbedef060fead93ee6576a
parent44bd1f536db125b7bc06780f15f8fa45fa17f1bd
dccp: Fix compile warning in probe code.

Commit 93c9d3d6831d8040f69f77143bd4165b420ca93a ("dccp: fix
auto-loading of dccp(_probe)") fixed a bug but created a new
compiler warning:

net/dccp/probe.c: In function ‘dccpprobe_init’:
net/dccp/probe.c:166:2: warning: the omitted middle operand in ?: will always be ‘true’, suggest explicit middle operand [-Wparentheses]

try_then_request_module() is built for situations where the
"existence" test is some lookup function that returns a non-NULL
object on success, and with a reference count of some kind held.

Here we're looking for a success return of zero from the jprobe
registry.

Instead of fighting the way try_then_request_module() works, simply
open code what we want to happen in a local helper function.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/probe.c