[v2,09/10] i2c-i801: Null isr data buffer when done with it
diff mbox

Message ID 1464570544-975-10-git-send-email-minyard@acm.org
State Rejected
Headers show

Commit Message

Corey Minyard May 30, 2016, 1:09 a.m. UTC
From: Corey Minyard <cminyard@mvista.com>

Don't leave a pointer to some external buffer lying around.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
---
 drivers/i2c/busses/i2c-i801.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Benjamin Tissoires June 9, 2016, 2:14 p.m. UTC | #1
On May 29 2016 or thereabouts, Corey Minyard wrote:
> From: Corey Minyard <cminyard@mvista.com>
> 
> Don't leave a pointer to some external buffer lying around.
> 
> Signed-off-by: Corey Minyard <cminyard@mvista.com>
> ---

Looks good to me.

Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

>  drivers/i2c/busses/i2c-i801.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
> index 70da60a..bb15356 100644
> --- a/drivers/i2c/busses/i2c-i801.c
> +++ b/drivers/i2c/busses/i2c-i801.c
> @@ -598,6 +598,7 @@ static int i801_block_transaction_byte_by_byte(struct i801_priv *priv,
>  			dev_warn(&priv->pci_dev->dev,
>  				 "Timeout waiting for interrupt!\n");
>  		}
> +		priv->data = NULL;
>  		priv->status = 0;
>  		return status;
>  	}
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 70da60a..bb15356 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -598,6 +598,7 @@  static int i801_block_transaction_byte_by_byte(struct i801_priv *priv,
 			dev_warn(&priv->pci_dev->dev,
 				 "Timeout waiting for interrupt!\n");
 		}
+		priv->data = NULL;
 		priv->status = 0;
 		return status;
 	}