From patchwork Tue Nov 20 05:22:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 12962 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id BEF9723FC2 for ; Tue, 20 Nov 2012 05:29:03 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 767CCA18F7F for ; Tue, 20 Nov 2012 05:29:03 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so7671712iej.11 for ; Mon, 19 Nov 2012 21:29:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=rRHPWLo8Zk4Yg9F+/xHqzQ5w0nZ+iUtqNUxvXomFjec=; b=WMUhh8yWZO7kVX8GFA7M21dkEivJNCprn0/82RTjlWazlLyw3IMQSuAaoebxHVhIGt TW3Bo+YFvMbf4Nkx5ynSFdw+GwlOSNHT5g3xI80WthMYEhX7LM8yVV2ZEm+HgYyR2zG1 WK88WcK6vsjc+uKUPUhetvcpjyPzuas+pz3K63LpwyklxN+0drRykFT1u7gXufL4D6pQ kOdy1HKl8nYYKSrbsg6ZS/hvtfXCAh8Gby2YL1h+PUtxJzRWOC2JV3q8UZKswRzZfCE0 EuDEOhrHGl7HVCoLbv2oKgiF9vJLF00tQUdmYkxNszp7gEcVC7/9OB6FOYkR5AQOCsdb qO5w== Received: by 10.50.42.168 with SMTP id p8mr8810630igl.57.1353389343242; Mon, 19 Nov 2012 21:29:03 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp271266igt; Mon, 19 Nov 2012 21:29:02 -0800 (PST) Received: by 10.68.212.106 with SMTP id nj10mr45788371pbc.101.1353389342782; Mon, 19 Nov 2012 21:29:02 -0800 (PST) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by mx.google.com with ESMTPS id f9si16398131paz.87.2012.11.19.21.29.02 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Nov 2012 21:29:02 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.43; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f43.google.com with SMTP id fb10so1277460pad.2 for ; Mon, 19 Nov 2012 21:29:02 -0800 (PST) Received: by 10.68.252.168 with SMTP id zt8mr39823664pbc.43.1353389342399; Mon, 19 Nov 2012 21:29:02 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id d2sm7429712paw.19.2012.11.19.21.28.59 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Nov 2012 21:29:01 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: myungjoo.ham@samsung.com, cw00.choi@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 3/7] extcon: Fix return value in extcon-class.c Date: Tue, 20 Nov 2012 10:52:39 +0530 Message-Id: <1353388963-23761-4-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353388963-23761-1-git-send-email-sachin.kamat@linaro.org> References: <1353388963-23761-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQnCfAV92WrzXqb7zIqlPQq/KInBfEajWwly7wdYZhngfseEEB0O6RYmn7Pxfy0S0sTXpPIr Return the value obtained from the function extcon_register_interest instead of -EINVAL. Silences the following warning: drivers/extcon/extcon-class.c:475 extcon_register_interest() info: why not propagate 'obj->cable_index' from extcon_find_cable_index() instead of -22? Signed-off-by: Sachin Kamat --- drivers/extcon/extcon-class.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c index 8e577ed..60adc04 100644 --- a/drivers/extcon/extcon-class.c +++ b/drivers/extcon/extcon-class.c @@ -472,7 +472,7 @@ int extcon_register_interest(struct extcon_specific_cable_nb *obj, obj->cable_index = extcon_find_cable_index(obj->edev, cable_name); if (obj->cable_index < 0) - return -EINVAL; + return obj->cable_index; obj->user_nb = nb;