diff mbox series

spi: omap-100k: remove set but not used variable

Message ID 1620784512-46828-1-git-send-email-tiantao6@hisilicon.com (mailing list archive)
State New
Headers show
Series spi: omap-100k: remove set but not used variable | expand

Commit Message

Tian Tao May 12, 2021, 1:55 a.m. UTC
The assignment to status on lines 296 and 315 is meaningless and will
rewriten, so just delete.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/spi/spi-omap-100k.c | 2 --
 1 file changed, 2 deletions(-)

Comments

tiantao (H) May 12, 2021, 3:07 a.m. UTC | #1
在 2021/5/12 9:55, tiantao (H) 写道:
> The assignment to status on lines 296 and 315 is meaningless and will
> rewriten, so just delete.
Sorry, please ignore this patch, jay fang has already fixed this problem.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
>   drivers/spi/spi-omap-100k.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c
> index 7062f29..dc9b86b 100644
> --- a/drivers/spi/spi-omap-100k.c
> +++ b/drivers/spi/spi-omap-100k.c
> @@ -296,7 +296,6 @@ static int omap1_spi100k_transfer_one_message(struct spi_master *master,
>   
>   	list_for_each_entry(t, &m->transfers, transfer_list) {
>   		if (t->tx_buf == NULL && t->rx_buf == NULL && t->len) {
> -			status = -EINVAL;
>   			break;
>   		}
>   		status = omap1_spi100k_setup_transfer(spi, t);
> @@ -315,7 +314,6 @@ static int omap1_spi100k_transfer_one_message(struct spi_master *master,
>   			m->actual_length += count;
>   
>   			if (count != t->len) {
> -				status = -EIO;
>   				break;
>   			}
>   		}
diff mbox series

Patch

diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c
index 7062f29..dc9b86b 100644
--- a/drivers/spi/spi-omap-100k.c
+++ b/drivers/spi/spi-omap-100k.c
@@ -296,7 +296,6 @@  static int omap1_spi100k_transfer_one_message(struct spi_master *master,
 
 	list_for_each_entry(t, &m->transfers, transfer_list) {
 		if (t->tx_buf == NULL && t->rx_buf == NULL && t->len) {
-			status = -EINVAL;
 			break;
 		}
 		status = omap1_spi100k_setup_transfer(spi, t);
@@ -315,7 +314,6 @@  static int omap1_spi100k_transfer_one_message(struct spi_master *master,
 			m->actual_length += count;
 
 			if (count != t->len) {
-				status = -EIO;
 				break;
 			}
 		}