summaryrefslogtreecommitdiffstats
path: root/drivers/staging/pi433
diff options
context:
space:
mode:
authorValentin Vidic <Valentin.Vidic@CARNet.hr>2017-12-19 15:56:18 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-19 16:05:38 +0100
commit83e3e2ef74722ea20e478ebd4fa927f2225ef363 (patch)
tree0a7058ea330d7c8863eae08c8e4812a8c37433db /drivers/staging/pi433
parentda3761feaec3cfc4f247b6cb9e366b8d40b3c356 (diff)
downloadop-kernel-dev-83e3e2ef74722ea20e478ebd4fa927f2225ef363.zip
op-kernel-dev-83e3e2ef74722ea20e478ebd4fa927f2225ef363.tar.gz
staging: pi433: collapse else block after return statement
Fixes checkpatch warning: WARNING: else is not generally useful after a break or return Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/pi433')
-rw-r--r--drivers/staging/pi433/pi433_if.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 4752056..cb37f34 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -772,11 +772,11 @@ pi433_read(struct file *filp, char __user *buf, size_t size, loff_t *f_pos)
if (device->rx_active) {
mutex_unlock(&device->rx_lock);
return -EAGAIN;
- } else {
- device->rx_active = true;
- mutex_unlock(&device->rx_lock);
}
+ device->rx_active = true;
+ mutex_unlock(&device->rx_lock);
+
/* start receiving */
/* will block until something was received*/
device->rx_buffer_size = size;
@@ -1116,12 +1116,12 @@ static int pi433_probe(struct spi_device *spi)
if (retval) {
dev_dbg(&spi->dev, "configuration of SPI interface failed!\n");
return retval;
- } else {
- dev_dbg(&spi->dev,
- "spi interface setup: mode 0x%2x, %d bits per word, %dhz max speed",
- spi->mode, spi->bits_per_word, spi->max_speed_hz);
}
+ dev_dbg(&spi->dev,
+ "spi interface setup: mode 0x%2x, %d bits per word, %dhz max speed",
+ spi->mode, spi->bits_per_word, spi->max_speed_hz);
+
/* Ping the chip by reading the version register */
retval = spi_w8r8(spi, 0x10);
if (retval < 0)
OpenPOWER on IntegriCloud