From patchwork Wed Feb 13 10:40:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 2135131 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EF306DFE75 for ; Wed, 13 Feb 2013 10:41:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933686Ab3BMKki (ORCPT ); Wed, 13 Feb 2013 05:40:38 -0500 Received: from mail.free-electrons.com ([94.23.35.102]:49802 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933670Ab3BMKkg (ORCPT ); Wed, 13 Feb 2013 05:40:36 -0500 Received: by mail.free-electrons.com (Postfix, from userid 106) id 916A081E; Wed, 13 Feb 2013 11:40:35 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.3.2 Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id 0D4FE7B6; Wed, 13 Feb 2013 11:40:35 +0100 (CET) From: Maxime Ripard To: linux-fbdev@vger.kernel.org Cc: joe@perches.com, Andrew Morton , Richard Purdie , Florian Tobias Schandinat , linux-kernel@vger.kernel.org Subject: [PATCH 3/5] fb: hx8357: Remove useless error message Date: Wed, 13 Feb 2013 11:40:26 +0100 Message-Id: <1360752028-7301-4-git-send-email-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360752028-7301-1-git-send-email-maxime.ripard@free-electrons.com> References: <1360752028-7301-1-git-send-email-maxime.ripard@free-electrons.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org In case of a failing allocation, a dump stack will be printed anyway, so the dev_err is redundant. Signed-off-by: Maxime Ripard --- 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 2691fd6..7c82561 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];