From patchwork Wed Sep 9 04:32:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 515672 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id EAEF4140134 for ; Wed, 9 Sep 2015 14:33:40 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b=OtZph5mi; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 911204B7BC; Wed, 9 Sep 2015 06:33:37 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yELA4pZuARlD; Wed, 9 Sep 2015 06:33:37 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 182EB4B7C2; Wed, 9 Sep 2015 06:33:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 896214B79B for ; Wed, 9 Sep 2015 06:33:24 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7t7aZUnExMBm for ; Wed, 9 Sep 2015 06:33:24 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ig0-f173.google.com (mail-ig0-f173.google.com [209.85.213.173]) by theia.denx.de (Postfix) with ESMTPS id 0F20F4B795 for ; Wed, 9 Sep 2015 06:33:21 +0200 (CEST) Received: by igcrk20 with SMTP id rk20so91244643igc.1 for ; Tue, 08 Sep 2015 21:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=dSSRyseA5fNQCjjb3I01UDW0sDP9EEL9Ii1ORQ4/5sM=; b=OtZph5mirrzeNi/lt/jDHFl2ienLNxAmV54CNU6W8O2ISNViZmNPc78XrG/sQrEB1M QuXcp1Ac/r0t9sGUxlU6yYMivYI3ZoiXEltxRGf8QCUPGVKVHDKST8nco1MuwxejdY5B yVRMU+8OCJ2Ql71prPljrYrdHgeTlXNCXCfvs8lwTjkjA//bxcTJc/WHzbkXlPaNSvRC CHMMZe26qKGcGN7qOxxxTBPKZfeR+fouFo3EdmvNBXRErkFvRY5qXE8dObZPaIYdjewe vqnpeUHKtdo2mwKwXnjR4r4vWu/zynTMpJqQ0qGUSvTpGWZlRekiEourMTgEghoCPZGf pC3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=dSSRyseA5fNQCjjb3I01UDW0sDP9EEL9Ii1ORQ4/5sM=; b=GMd8xChW95qs8UgcvbYceeQ5ILqYHF/cHcfg9JHxhxOsQ7UrFaZE2xtkyU3yW6IaI3 Lvn4WieQrDqghVe8Or+AI/LReGxy94yWCDkIPv6gGSO1wmMp8MlwpNLrY+9j29DvoeoT Pe6Wwh+Hum3tqHUAxRPvFn7RPAbFUmP0A/CB2wn3y/IsCaLeBWXRd5kuBUk89a+8rSL2 tZr/jqMsom1UhSaARhs2GYnF6H/FqdNm5bQQqVkBVrkW1Ylqb/Kv2TeTjc48w6MNs4/D XifYCWaWJv0X0hoxCZAOstrDuj/QUu2mfjomenRGnQVqBuEP/r+7mZOI9SV/x3XD5//t kmvA== X-Gm-Message-State: ALoCoQmVhBikFk0iq22MPIVW9nhhcVmo/oUSDlB08D12HgMMI422ncEf966wSLQVo9TjcBq4Vh81 X-Received: by 10.50.77.73 with SMTP id q9mr48545845igw.78.1441773200268; Tue, 08 Sep 2015 21:33:20 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by smtp.gmail.com with ESMTPSA id k2sm960566igx.0.2015.09.08.21.33.18 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Sep 2015 21:33:19 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 486AB220BB2; Tue, 8 Sep 2015 22:33:18 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Tue, 8 Sep 2015 22:32:26 -0600 Message-Id: <1441773171-4575-4-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.6.0.rc0.131.gf624c3d In-Reply-To: <1441773171-4575-1-git-send-email-sjg@chromium.org> References: <1441773171-4575-1-git-send-email-sjg@chromium.org> Cc: Tom Rini Subject: [U-Boot] [PATCH 03/28] input: Return -ENOSPC when there is not space X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Return a useful error instead of -1 when something goes wrong. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- drivers/input/input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/input.c b/drivers/input/input.c index 007b855..9033935 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include @@ -467,7 +468,7 @@ int input_init(struct input_config *config, int leds) input_add_table(config, KEY_LEFTCTRL, KEY_RIGHTCTRL, kbd_ctrl_xlate, ARRAY_SIZE(kbd_ctrl_xlate))) { debug("%s: Could not add modifier tables\n", __func__); - return -1; + return -ENOSPC; } return 0;