From ed714f6e0a881dc62ad721c96fab2df22ec3be3a Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 20 Feb 2013 13:15:28 +1100 Subject: [PATCH] fb: hx8357: Remove useless error message In case of a failing allocation, a dump stack will be printed anyway, so the dev_err is redundant. Signed-off-by: Maxime Ripard Cc: Jingoo Han Cc: Richard Purdie Cc: Florian Tobias Schandinat Cc: Joe Perches Signed-off-by: Andrew Morton --- drivers/video/backlight/hx8357.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c index 2691fd6ad3d9..7c82561b01fc 100644 --- a/drivers/video/backlight/hx8357.c +++ b/drivers/video/backlight/hx8357.c @@ -96,10 +96,8 @@ static int hx8357_spi_write_then_read(struct lcd_device *lcdev, local_txbuf = kcalloc(txlen, sizeof(*local_txbuf), GFP_KERNEL); - if (!local_txbuf) { - dev_err(&lcdev->dev, "Couldn't allocate data buffer.\n"); + if (!local_txbuf) return -ENOMEM; - } for (i = 0; i < txlen; i++) { local_txbuf[i] = txbuf[i]; -- 2.39.5