spi-pl022: Add missing return value update
authorVirupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
Mon, 13 Jun 2011 10:53:46 +0000 (16:23 +0530)
committerGrant Likely <grant.likely@secretlab.ca>
Mon, 13 Jun 2011 15:18:45 +0000 (09:18 -0600)
Return error on out of range cpsdvsr value.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/amba-pl022.c

index 6a9e58dd36c7e17cd5d4a7bbd58ed10ab4476f32..d18ce9e946d8d085b9ecf0c8fefe9cc88cd99334 100644 (file)
@@ -1861,6 +1861,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;