Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751588AbbLBGIu (ORCPT ); Wed, 2 Dec 2015 01:08:50 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35531 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750990AbbLBGIs (ORCPT ); Wed, 2 Dec 2015 01:08:48 -0500 Date: Tue, 1 Dec 2015 22:08:46 -0800 From: Jeremiah Mahler To: Martyn Welch Cc: Olof Johansson , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] Add support for monitoring Chrome OS firmware signals Message-ID: <20151202060846.GA3306@localhost.localdomain> Mail-Followup-To: Jeremiah Mahler , Martyn Welch , Olof Johansson , linux-kernel@vger.kernel.org References: <1448997171-7064-3-git-send-email-martyn.welch@collabora.co.uk> <1449001186-24743-1-git-send-email-martyn.welch@collabora.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1449001186-24743-1-git-send-email-martyn.welch@collabora.co.uk> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 813 Lines: 26 Martyn, On Tue, Dec 01, 2015 at 08:19:46PM +0000, Martyn Welch wrote: > Select Chromebooks have gpio attached to signals used to cause the firmware > to enter alternative modes of operation and/or control other device [...] > + > +static int chromeos_firmware_probe(struct platform_device *pdev) > +{ > + int err; > + struct chromeos_firmware_data *gpios; > + > + gpios = devm_kmalloc(&pdev->dev, sizeof(gpios), GFP_KERNEL); Should this be 'sizeof(*gpios)' so it allocates enough room for the entire struct instead of just the pointer? [...] -- - Jeremiah Mahler -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/