From patchwork Thu Jan 7 18:30:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Blank X-Patchwork-Id: 71615 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o07Ier7g022549 for ; Thu, 7 Jan 2010 18:40:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751681Ab0AGSkw (ORCPT ); Thu, 7 Jan 2010 13:40:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753440Ab0AGSkw (ORCPT ); Thu, 7 Jan 2010 13:40:52 -0500 Received: from wavehammer.waldi.eu.org ([82.139.201.20]:56845 "EHLO wavehammer.waldi.eu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751681Ab0AGSkv (ORCPT ); Thu, 7 Jan 2010 13:40:51 -0500 Received: by wavehammer.waldi.eu.org (Postfix, from userid 1000) id 7566854212; Thu, 7 Jan 2010 19:30:09 +0100 (CET) Date: Thu, 7 Jan 2010 19:30:09 +0100 From: Bastian Blank To: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Ping Cheng Subject: [PATCH 7/7] Input: wacom - Fail on missing features Message-ID: <20100107183009.GA13036@wavehammer.waldi.eu.org> Mail-Followup-To: Bastian Blank , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Ping Cheng References: <20100107182553.GA11236@wavehammer.waldi.eu.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100107182553.GA11236@wavehammer.waldi.eu.org> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 41a631b..c44b9f0 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -534,6 +534,9 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i struct input_dev *input_dev; int error = -ENOMEM; + if (!features) + return -EIO; + wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL); wacom_wac = kzalloc(sizeof(struct wacom_wac), GFP_KERNEL); input_dev = input_allocate_device();