summaryrefslogtreecommitdiffstats
path: root/kernel/kmod.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2005-10-30 15:02:44 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 17:37:23 -0800
commit20e1129ab831486c811d50d3905343ad48c4275f (patch)
treeab99b7172b903d2b4d3c58d45c11c41e4bba9c87 /kernel/kmod.c
parent29db9190634067c5a328ee5fcc2890251b836b4b (diff)
downloadop-kernel-dev-20e1129ab831486c811d50d3905343ad48c4275f.zip
op-kernel-dev-20e1129ab831486c811d50d3905343ad48c4275f.tar.gz
[PATCH] Keys: Get rid of warning in kmod.c if keys disabled
The attached patch gets rid of a "statement without effect" warning when CONFIG_KEYS is disabled by making use of the return value of key_get(). The compiler will optimise all of this away when keys are disabled. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/kmod.c')
-rw-r--r--kernel/kmod.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 44166e3..51a8920 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -131,14 +131,14 @@ struct subprocess_info {
static int ____call_usermodehelper(void *data)
{
struct subprocess_info *sub_info = data;
- struct key *old_session;
+ struct key *new_session, *old_session;
int retval;
/* Unblock all signals and set the session keyring. */
- key_get(sub_info->ring);
+ new_session = key_get(sub_info->ring);
flush_signals(current);
spin_lock_irq(&current->sighand->siglock);
- old_session = __install_session_keyring(current, sub_info->ring);
+ old_session = __install_session_keyring(current, new_session);
flush_signal_handlers(current, 1);
sigemptyset(&current->blocked);
recalc_sigpending();
OpenPOWER on IntegriCloud