Skip to content

Commit

Permalink
[PATCH] Keys: Get rid of warning in kmod.c if keys disabled
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dhowells authored and Linus Torvalds committed Oct 31, 2005
1 parent 29db919 commit 20e1129
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/kmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 20e1129

Please sign in to comment.