Commit 20e1129a authored by David Howells's avatar David Howells Committed by Linus Torvalds

[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: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 29db9190
...@@ -131,14 +131,14 @@ struct subprocess_info { ...@@ -131,14 +131,14 @@ struct subprocess_info {
static int ____call_usermodehelper(void *data) static int ____call_usermodehelper(void *data)
{ {
struct subprocess_info *sub_info = data; struct subprocess_info *sub_info = data;
struct key *old_session; struct key *new_session, *old_session;
int retval; int retval;
/* Unblock all signals and set the session keyring. */ /* Unblock all signals and set the session keyring. */
key_get(sub_info->ring); new_session = key_get(sub_info->ring);
flush_signals(current); flush_signals(current);
spin_lock_irq(&current->sighand->siglock); 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); flush_signal_handlers(current, 1);
sigemptyset(&current->blocked); sigemptyset(&current->blocked);
recalc_sigpending(); recalc_sigpending();
......
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