From patchwork Mon Sep 30 14:35:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Kosina X-Patchwork-Id: 2965461 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E79B69F288 for ; Mon, 30 Sep 2013 14:36:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 241B4201FD for ; Mon, 30 Sep 2013 14:35:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 78544201CD for ; Mon, 30 Sep 2013 14:35:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754448Ab3I3Ofx (ORCPT ); Mon, 30 Sep 2013 10:35:53 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40845 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752788Ab3I3Ofw (ORCPT ); Mon, 30 Sep 2013 10:35:52 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id F1F06A50E4; Mon, 30 Sep 2013 16:35:50 +0200 (CEST) Date: Mon, 30 Sep 2013 16:35:47 +0200 (CEST) From: Jiri Kosina To: Dan Carpenter , Joseph Salisbury Cc: list@osuosl.org, Haiyang Zhang , LKML , open@osuosl.org, HID CORE LAYER , devel@linuxdriverproject.org, thomas@m3y3r.de Subject: Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to memdup In-Reply-To: <20130927152412.GF6192@mwanda> Message-ID: References: <5237430B.5040009@canonical.com> <20130916203824.GP25896@mwanda> <52376ED9.5080208@canonical.com> <20130916210503.GQ25896@mwanda> <5237A5D5.8010006@canonical.com> <52432152.3030100@canonical.com> <52459942.3020600@canonical.com> <20130927152412.GF6192@mwanda> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, 27 Sep 2013, Dan Carpenter wrote: > It looks like magicmouse_raw_event() returns 1 on success and 0 on > failure. Good catch indeed. I am not completely sure whether we are going to fix an oops or not by this, as I haven't seen the actual oops anywhere in this thread :) But definitely this looks like a good fix. Joseph, could you please test with that? Thanks. diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index 3b43d1c..c211eb9 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c @@ -334,7 +334,7 @@ static int magicmouse_raw_event(struct hid_device *hdev, size - 2 - data[1]); break; default: - return 0; + return 1; } if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE) { @@ -347,7 +347,7 @@ static int magicmouse_raw_event(struct hid_device *hdev, } input_sync(input); - return 1; + return 0; } static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hdev)