Skip to content

Commit 6f7c962

Browse files
Alan CoxJiri Kosina
authored andcommitted
rfkill: error cannot be set here so simplify
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1 parent db83101 commit 6f7c962

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎net/rfkill/core.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ static ssize_t rfkill_soft_store(struct device *dev,
656656
rfkill_set_block(rfkill, state);
657657
mutex_unlock(&rfkill_global_mutex);
658658

659-
return err ?: count;
659+
return count;
660660
}
661661

662662
static u8 user_state_from_blocked(unsigned long state)
@@ -701,7 +701,7 @@ static ssize_t rfkill_state_store(struct device *dev,
701701
rfkill_set_block(rfkill, state == RFKILL_USER_STATE_SOFT_BLOCKED);
702702
mutex_unlock(&rfkill_global_mutex);
703703

704-
return err ?: count;
704+
return count;
705705
}
706706

707707
static ssize_t rfkill_claim_show(struct device *dev,

0 commit comments

Comments
 (0)