From: Sachin Kamat Date: Fri, 13 Jun 2014 04:47:41 +0000 (+0530) Subject: spi: spi-adi-v3: Remove redundant OOM message X-Git-Tag: firefly_0821_release~176^2~3482^2~3^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1380caa0c03a0db6eed21a84df9224ce3b45ea56;p=firefly-linux-kernel-4.4.55.git spi: spi-adi-v3: Remove redundant OOM message Let memory subsystem do the error logging. Signed-off-by: Sachin Kamat Reviewed-by: Naveen Krishna Chatradhi Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-adi-v3.c b/drivers/spi/spi-adi-v3.c index dcb2287c7f8a..19ea8fb78cc7 100644 --- a/drivers/spi/spi-adi-v3.c +++ b/drivers/spi/spi-adi-v3.c @@ -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,