From patchwork Wed Feb 13 10:40:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 2135181 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 6035E3FCF6 for ; Wed, 13 Feb 2013 10:41:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933760Ab3BMKlH (ORCPT ); Wed, 13 Feb 2013 05:41:07 -0500 Received: from mail.free-electrons.com ([94.23.35.102]:49796 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932536Ab3BMKkf (ORCPT ); Wed, 13 Feb 2013 05:40:35 -0500 Received: by mail.free-electrons.com (Postfix, from userid 106) id 6775081D; Wed, 13 Feb 2013 11:40:34 +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 C7EBF7B6; Wed, 13 Feb 2013 11:40:33 +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 2/5] fb: hx8357: Fix inverted parameters for kcalloc Date: Wed, 13 Feb 2013 11:40:25 +0100 Message-Id: <1360752028-7301-3-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 The element size and the number of elements was inverted in the kcalloc call. Signed-off-by: Maxime Ripard --- drivers/video/backlight/hx8357.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c index 071525c..2691fd6 100644 --- a/drivers/video/backlight/hx8357.c +++ b/drivers/video/backlight/hx8357.c @@ -94,7 +94,7 @@ static int hx8357_spi_write_then_read(struct lcd_device *lcdev, if (txlen) { int i; - local_txbuf = kcalloc(sizeof(*local_txbuf), txlen, GFP_KERNEL); + local_txbuf = kcalloc(txlen, sizeof(*local_txbuf), GFP_KERNEL); if (!local_txbuf) { dev_err(&lcdev->dev, "Couldn't allocate data buffer.\n");