spi: spi-adi-v3: Remove redundant OOM message
authorSachin Kamat <sachin.kamat@samsung.com>
Fri, 13 Jun 2014 04:47:41 +0000 (10:17 +0530)
committerMark Brown <broonie@linaro.org>
Sat, 21 Jun 2014 10:14:02 +0000 (11:14 +0100)
Let memory subsystem do the error logging.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-adi-v3.c

index dcb2287c7f8a5a7af10d7805380f27e33574d89e..19ea8fb78cc7a804a1c21207776c39969901f041 100644 (file)
@@ -660,10 +660,9 @@ static int adi_spi_setup(struct spi_device *spi)
                struct adi_spi3_chip *chip_info = spi->controller_data;
 
                chip = kzalloc(sizeof(*chip), GFP_KERNEL);
-               if (!chip) {
-                       dev_err(&spi->dev, "can not allocate chip data\n");
+               if (!chip)
                        return -ENOMEM;
-               }
+
                if (chip_info) {
                        if (chip_info->control & ~ctl_reg) {
                                dev_err(&spi->dev,