rfkill: error cannot be set here so simplify
authorAlan Cox <alan@linux.intel.com>
Thu, 25 Oct 2012 14:18:34 +0000 (15:18 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 25 Oct 2012 15:58:41 +0000 (17:58 +0200)
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
net/rfkill/core.c

index 752b723..61c112c 100644 (file)
@@ -656,7 +656,7 @@ static ssize_t rfkill_soft_store(struct device *dev,
        rfkill_set_block(rfkill, state);
        mutex_unlock(&rfkill_global_mutex);
 
-       return err ?: count;
+       return count;
 }
 
 static u8 user_state_from_blocked(unsigned long state)
@@ -701,7 +701,7 @@ static ssize_t rfkill_state_store(struct device *dev,
        rfkill_set_block(rfkill, state == RFKILL_USER_STATE_SOFT_BLOCKED);
        mutex_unlock(&rfkill_global_mutex);
 
-       return err ?: count;
+       return count;
 }
 
 static ssize_t rfkill_claim_show(struct device *dev,