From: ludovic.desroches <ludovic.desroches@atmel.com>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: ludovic.desroches@atmel.com, nicolas.ferre@atmel.com,
linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] i2c: at91: add a sanity check on i2c message length
Date: Wed, 24 Oct 2012 16:34:13 +0200 [thread overview]
Message-ID: <5087FC65.30904@atmel.com> (raw)
In-Reply-To: <1349879158-27268-1-git-send-email-ludovic.desroches@atmel.com>
Hi Wolfram,
Le 10/10/2012 04:25 PM, ludovic.desroches@atmel.com a écrit :
> From: Ludovic Desroches <ludovic.desroches@atmel.com>
>
> If the i2c message length is zero, i2c-at91 will directly return an error
> instead of trying to send a zero-length message.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> ---
>
> fix for 3.7
>
> drivers/i2c/busses/i2c-at91.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
> index aa59a25..eaddc77 100644
> --- a/drivers/i2c/busses/i2c-at91.c
> +++ b/drivers/i2c/busses/i2c-at91.c
> @@ -263,6 +263,9 @@ static int at91_twi_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num)
> unsigned int_addr_flag = 0;
> struct i2c_msg *m_start = msg;
>
> + if (!msg->len)
> + return -EINVAL;
> +
> dev_dbg(&adap->dev, "at91_xfer: processing %d messages:\n", num);
>
> /*
>
Could you take this fix for 3.7?
Thanks
Regards
Ludovic
WARNING: multiple messages have this Message-ID (diff)
From: ludovic.desroches@atmel.com (ludovic.desroches)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] i2c: at91: add a sanity check on i2c message length
Date: Wed, 24 Oct 2012 16:34:13 +0200 [thread overview]
Message-ID: <5087FC65.30904@atmel.com> (raw)
In-Reply-To: <1349879158-27268-1-git-send-email-ludovic.desroches@atmel.com>
Hi Wolfram,
Le 10/10/2012 04:25 PM, ludovic.desroches at atmel.com a ?crit :
> From: Ludovic Desroches <ludovic.desroches@atmel.com>
>
> If the i2c message length is zero, i2c-at91 will directly return an error
> instead of trying to send a zero-length message.
>
> Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
> ---
>
> fix for 3.7
>
> drivers/i2c/busses/i2c-at91.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c
> index aa59a25..eaddc77 100644
> --- a/drivers/i2c/busses/i2c-at91.c
> +++ b/drivers/i2c/busses/i2c-at91.c
> @@ -263,6 +263,9 @@ static int at91_twi_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num)
> unsigned int_addr_flag = 0;
> struct i2c_msg *m_start = msg;
>
> + if (!msg->len)
> + return -EINVAL;
> +
> dev_dbg(&adap->dev, "at91_xfer: processing %d messages:\n", num);
>
> /*
>
Could you take this fix for 3.7?
Thanks
Regards
Ludovic
next prev parent reply other threads:[~2012-10-24 14:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 14:25 [PATCH] i2c: at91: add a sanity check on i2c message length ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w
2012-10-10 14:25 ` ludovic.desroches at atmel.com
2012-10-24 14:34 ` ludovic.desroches [this message]
2012-10-24 14:34 ` ludovic.desroches
[not found] ` <1349879158-27268-1-git-send-email-ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2012-11-01 22:29 ` Wolfram Sang
2012-11-01 22:29 ` Wolfram Sang
2012-11-02 11:04 ` ludovic.desroches
2012-11-02 11:04 ` ludovic.desroches
[not found] ` <5093A8CD.60006-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2012-11-02 11:14 ` Wolfram Sang
2012-11-02 11:14 ` Wolfram Sang
2012-11-02 16:00 ` ludovic.desroches
2012-11-02 16:00 ` ludovic.desroches
[not found] ` <5093EE2B.8080005-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2012-11-03 14:16 ` Wolfram Sang
2012-11-03 14:16 ` Wolfram Sang
2012-11-05 6:08 ` Voss, Nikolaus
2012-11-05 6:08 ` Voss, Nikolaus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5087FC65.30904@atmel.com \
--to=ludovic.desroches@atmel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=w.sang@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.