Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/kpc2000/kpc_spi/spi_driver.c: In function ‘kp_spi_transfer_one_message’: drivers/staging/kpc2000/kpc_spi/spi_driver.c:282:9: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] int status = 0; ^~~~~~ The variable 'status' is not used any more, remve it. Signed-off-by: Mao Wenan <maowenan@xxxxxxxxxx> --- v2: change the subject of the patch. --- drivers/staging/kpc2000/kpc_spi/spi_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_spi/spi_driver.c b/drivers/staging/kpc2000/kpc_spi/spi_driver.c index 86df16547a92..16f9518f8d63 100644 --- a/drivers/staging/kpc2000/kpc_spi/spi_driver.c +++ b/drivers/staging/kpc2000/kpc_spi/spi_driver.c @@ -279,7 +279,6 @@ kp_spi_transfer_one_message(struct spi_master *master, struct spi_message *m) struct kp_spi *kpspi; struct spi_transfer *transfer; union kp_spi_config sc; - int status = 0; spidev = m->spi; kpspi = spi_master_get_devdata(master); @@ -332,7 +331,6 @@ kp_spi_transfer_one_message(struct spi_master *master, struct spi_message *m) /* do the transfers for this message */ list_for_each_entry(transfer, &m->transfers, transfer_list) { if (transfer->tx_buf == NULL && transfer->rx_buf == NULL && transfer->len) { - status = -EINVAL; break; } @@ -370,7 +368,6 @@ kp_spi_transfer_one_message(struct spi_master *master, struct spi_message *m) m->actual_length += count; if (count != transfer->len) { - status = -EIO; break; } } -- 2.20.1