2011-06-13 10:55:18

by Virupax SADASHIVPETIMATH

[permalink] [raw]
Subject: [PATCH] spi-pl022: Add missing return value update

Return error on out of range cpsdvsr value.

Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Virupax Sadashivpetimath <[email protected]>
---
drivers/spi/spi-pl022.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 2541705..b3bd8d8 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -1859,6 +1859,7 @@ static int pl022_setup(struct spi_device *spi)
}
if ((clk_freq.cpsdvsr < CPSDVR_MIN)
|| (clk_freq.cpsdvsr > CPSDVR_MAX)) {
+ status = -EINVAL;
dev_err(&spi->dev,
"cpsdvsr is configured incorrectly\n");
goto err_config_params;
--
1.7.4.3


2011-06-13 15:09:00

by Grant Likely

[permalink] [raw]
Subject: Re: [PATCH] spi-pl022: Add missing return value update

On Mon, Jun 13, 2011 at 04:23:46PM +0530, Virupax Sadashivpetimath wrote:
> Return error on out of range cpsdvsr value.
>
> Acked-by: Linus Walleij <[email protected]>
> Signed-off-by: Virupax Sadashivpetimath <[email protected]>

It looks like this is a bug fix for v3.0, and probably for -stable too, correct?

g.

> ---
> drivers/spi/spi-pl022.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
> index 2541705..b3bd8d8 100644
> --- a/drivers/spi/spi-pl022.c
> +++ b/drivers/spi/spi-pl022.c
> @@ -1859,6 +1859,7 @@ static int pl022_setup(struct spi_device *spi)
> }
> if ((clk_freq.cpsdvsr < CPSDVR_MIN)
> || (clk_freq.cpsdvsr > CPSDVR_MAX)) {
> + status = -EINVAL;
> dev_err(&spi->dev,
> "cpsdvsr is configured incorrectly\n");
> goto err_config_params;
> --
> 1.7.4.3
>

2011-06-13 16:13:06

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] spi-pl022: Add missing return value update

On Mon, Jun 13, 2011 at 5:08 PM, Grant Likely <[email protected]> wrote:
> On Mon, Jun 13, 2011 at 04:23:46PM +0530, Virupax Sadashivpetimath wrote:
>> Return error on out of range cpsdvsr value.
>>
>> Acked-by: Linus Walleij <[email protected]>
>> Signed-off-by: Virupax Sadashivpetimath <[email protected]>
>
> It looks like this is a bug fix for v3.0, and probably for -stable too, correct?

ACK

Linus Walleij