From patchwork Fri May 30 10:36:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 31168 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 98AF720671 for ; Fri, 30 May 2014 10:38:42 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf8132958iec.2 for ; Fri, 30 May 2014 03:38:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=nRS2kUePszasmpyikmtfloKK6lY1ygCRR1/rm7TN/qY=; b=R938zlyyAexRVhUolmat8Hj3AlfQbxo8ZvsgGyqzeHUbK1CvgbV8nRuCXWq8rxI6/r Mp+0AXnSdWkalwQkRsDf3h2Ynnm4DtmdiwEKx2boKp9/3+n7io5EsKusP9guQZbrPW58 vVtT8l7JB6RunkZ+TQ0qYOo3WUCcS5jdFTgrAynvAF8Ce9cKj7SgKAkRdiMROroHD8ko TJdOrJOytt+Ef9TLL8/flb65qnLTFU16ONk1zrXGkKxL7JZbJtKy0L10/x/muLu2BfF9 dYEXpXbkad2ALrsFyEh3zQYz7VFqJkr7lXbej6RDjAE7RSHYNxT4eo3aBejA/aSG0Qya XnJA== X-Gm-Message-State: ALoCoQmMVl6zD2qnSTO16Q78Jv00Jp7xOVeoKMY2MUn3mJDpzsAjKA+Uehrd1mslVvK4idG4eTg5 X-Received: by 10.182.128.234 with SMTP id nr10mr6039800obb.0.1401446322069; Fri, 30 May 2014 03:38:42 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.135 with SMTP id e7ls958501qga.70.gmail; Fri, 30 May 2014 03:38:41 -0700 (PDT) X-Received: by 10.52.142.100 with SMTP id rv4mr868086vdb.50.1401446321914; Fri, 30 May 2014 03:38:41 -0700 (PDT) Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by mx.google.com with ESMTPS id fr1si2669081vdc.68.2014.05.30.03.38.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 May 2014 03:38:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) client-ip=209.85.220.170; Received: by mail-vc0-f170.google.com with SMTP id la4so1860071vcb.1 for ; Fri, 30 May 2014 03:38:41 -0700 (PDT) X-Received: by 10.52.190.138 with SMTP id gq10mr1067941vdc.47.1401446321774; Fri, 30 May 2014 03:38:41 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp101031vcb; Fri, 30 May 2014 03:38:41 -0700 (PDT) X-Received: by 10.67.22.33 with SMTP id hp1mr16843991pad.134.1401446321072; Fri, 30 May 2014 03:38:41 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xp1si5025306pab.44.2014.05.30.03.38.40; Fri, 30 May 2014 03:38:40 -0700 (PDT) Received-SPF: none (google.com: linux-input-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932303AbaE3Kik (ORCPT ); Fri, 30 May 2014 06:38:40 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:64869 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932170AbaE3Kij (ORCPT ); Fri, 30 May 2014 06:38:39 -0400 Received: by mail-pd0-f171.google.com with SMTP id y13so822361pdi.2 for ; Fri, 30 May 2014 03:38:38 -0700 (PDT) X-Received: by 10.66.174.199 with SMTP id bu7mr17327051pac.54.1401446318821; Fri, 30 May 2014 03:38:38 -0700 (PDT) Received: from linaro.sisodomain.com ([14.140.216.146]) by mx.google.com with ESMTPSA id eh4sm5697918pbc.79.2014.05.30.03.38.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 May 2014 03:38:38 -0700 (PDT) From: Sachin Kamat To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, sachin.kamat@linaro.org, Donggeun Kim Subject: [PATCH 1/1] Input: max8997_haptic - Check return value of regulator_enable Date: Fri, 30 May 2014 16:06:13 +0530 Message-Id: <1401446173-21981-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Fixes the following warning: drivers/input/misc/max8997_haptic.c:185:19: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Sachin Kamat Cc: Donggeun Kim --- drivers/input/misc/max8997_haptic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/input/misc/max8997_haptic.c b/drivers/input/misc/max8997_haptic.c index 1fea5484941f..4f4c34e135f5 100644 --- a/drivers/input/misc/max8997_haptic.c +++ b/drivers/input/misc/max8997_haptic.c @@ -182,7 +182,11 @@ static void max8997_haptic_enable(struct max8997_haptic *chip) if (!chip->enabled) { chip->enabled = true; - regulator_enable(chip->regulator); + error = regulator_enable(chip->regulator); + if (error) { + dev_err(chip->dev, "Failed to enable regulator"); + goto out; + } max8997_haptic_configure(chip); if (chip->mode == MAX8997_EXTERNAL_MODE) pwm_enable(chip->pwm);