diff mbox

[1/2] spi: spi-adi-v3: Remove redundant OOM message

Message ID 1402634862-21783-1-git-send-email-sachin.kamat@samsung.com (mailing list archive)
State Accepted
Commit 1380caa0c03a0db6eed21a84df9224ce3b45ea56
Headers show

Commit Message

Sachin Kamat June 13, 2014, 4:47 a.m. UTC
Let memory subsystem do the error logging.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
---
 drivers/spi/spi-adi-v3.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Naveen Krishna Ch June 13, 2014, 5:11 a.m. UTC | #1
Hello Sachin,

On 13 June 2014 10:17, Sachin Kamat <sachin.kamat@samsung.com> wrote:
> Let memory subsystem do the error logging.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
> ---
>  drivers/spi/spi-adi-v3.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> 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,
> --
> 1.7.9.5
Reviewed-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-spi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mark Brown June 21, 2014, 10:14 a.m. UTC | #2
On Fri, Jun 13, 2014 at 10:17:41AM +0530, Sachin Kamat wrote:
> Let memory subsystem do the error logging.

Applied, thanks.
diff mbox

Patch

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,