From patchwork Fri Aug 23 02:54:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2848520 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2CBA4BF546 for ; Fri, 23 Aug 2013 02:55:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2815A20362 for ; Fri, 23 Aug 2013 02:55:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 043E920360 for ; Fri, 23 Aug 2013 02:54:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752312Ab3HWCy6 (ORCPT ); Thu, 22 Aug 2013 22:54:58 -0400 Received: from mail-bk0-f49.google.com ([209.85.214.49]:40122 "EHLO mail-bk0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753109Ab3HWCy4 (ORCPT ); Thu, 22 Aug 2013 22:54:56 -0400 Received: by mail-bk0-f49.google.com with SMTP id r7so31230bkg.8 for ; Thu, 22 Aug 2013 19:54:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=DJcaTlOIJLrEVll6YBow8+qEpmRZh7wB0qM54TgjRu8=; b=rnYzHc4QPSGT/3uTDjvCyiBGZp7uOF11O/SCpfyqANfRZNKQeobvEfMbCfvaKlbNW+ vzpFRPreytdHFbxGBq8igqEnKK1Oyh9D8p+uYiZyzArPUIxugmcBMNjGthgwu5QjeEUw jCOLBRNjClv8GF23YffpVpblUa8Z7G4TdPkfp+AAsOD2ZniPkOG7sQbn/0F5czd49Vyh ewnsoiMy/XAxCCoT3Q/TXjFNRwsXLWSXcQ/IkHF88nfMH4Vr+uC3aawzB8flYVzi5Zy+ IS/5mmvr/G5GM1yF25p/5pZRQzKuRcQ7OiRdKea4ahBZVADK4RImahyMOYpAGxVKbpk/ NiKQ== MIME-Version: 1.0 X-Received: by 10.204.62.132 with SMTP id x4mr12983792bkh.22.1377226495445; Thu, 22 Aug 2013 19:54:55 -0700 (PDT) Received: by 10.205.13.74 with HTTP; Thu, 22 Aug 2013 19:54:55 -0700 (PDT) Date: Fri, 23 Aug 2013 10:54:55 +0800 Message-ID: Subject: [PATCH] Input: as5011 - fix error return code in as5011_probe() From: Wei Yongjun To: dmitry.torokhov@gmail.com, wfp5p@virginia.edu, broonie@opensource.wolfsonmicro.com, shubhrajyoti@ti.com, javier@dowhile0.org Cc: yongjun_wei@trendmicro.com.cn, linux-input@vger.kernel.org Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun --- drivers/input/joystick/as5011.c | 1 + 1 file changed, 1 insertion(+) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c index 121cd63..262ebe2 100644 --- a/drivers/input/joystick/as5011.c +++ b/drivers/input/joystick/as5011.c @@ -288,6 +288,7 @@ static int as5011_probe(struct i2c_client *client, if (irq < 0) { dev_err(&client->dev, "Failed to get irq number for button gpio\n"); + error = irq; goto err_free_button_gpio; }