From patchwork Sat May 25 11:25:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sylwester Nawrocki X-Patchwork-Id: 2613241 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2755ADF2A2 for ; Sat, 25 May 2013 11:26:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755204Ab3EYL0h (ORCPT ); Sat, 25 May 2013 07:26:37 -0400 Received: from mail-bk0-f53.google.com ([209.85.214.53]:41906 "EHLO mail-bk0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754881Ab3EYL0g (ORCPT ); Sat, 25 May 2013 07:26:36 -0400 Received: by mail-bk0-f53.google.com with SMTP id mx1so2980865bkb.12 for ; Sat, 25 May 2013 04:26:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=HCMfob0YTHi5KsFH4eL5M4mZQCkeGCHUrDF0wL0ZNfI=; b=DVIwBRzuX5TpzpZAiW43ENt2LXdOgH+nsOA01ULBqEY8olClWa2/0rYIUhps0uwgiY OY6FFagiQYU0I4B+0yXq4G92z1VybIzPlfAncVZGtj6TH02vtSLdA7jUjViQPK4O7cBG TBHTwNcdMZiL+bBCLnjfIWnuzylhMgM3wTUhS5obHCwcHodxMslW8W9Jt5Ox2G/lasaN hJxJ2rt0XwKgVAd9+Ex8hQS5Ui6a/boZrU+gOS1mNsG+Ai5Xb9sBj2H6rBAd/Epyzqhp MF2urUZa9NY+NxwmCiDnzpmFIQXVIECRNMsXB8cbh5nlUMOhGJ8i6hYD2edIF68KbTXV ef+Q== X-Received: by 10.204.171.136 with SMTP id h8mr10237181bkz.18.1369481195665; Sat, 25 May 2013 04:26:35 -0700 (PDT) Received: from localhost.localdomain (093105185086.warszawa.vectranet.pl. [93.105.185.86]) by mx.google.com with ESMTPSA id b12sm5522266bkz.0.2013.05.25.04.26.33 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 25 May 2013 04:26:34 -0700 (PDT) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: a.hajda@samsung.com, arun.kk@samsung.com, k.debski@samsung.com, t.stanislaws@samsung.com, Sylwester Nawrocki Subject: [PATCH 1/5] s5c73m3: Do not ignore errors from regulator_enable() Date: Sat, 25 May 2013 13:25:51 +0200 Message-Id: <1369481155-30446-2-git-send-email-sylvester.nawrocki@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1369481155-30446-1-git-send-email-sylvester.nawrocki@gmail.com> References: <1369481155-30446-1-git-send-email-sylvester.nawrocki@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This fixes following compilation warning: drivers/media/i2c/s5c73m3/s5c73m3-core.c: In function ‘__s5c73m3_power_off’: drivers/media/i2c/s5c73m3/s5c73m3-core.c:1389:19: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result Cc: Andrzej Hajda Signed-off-by: Sylwester Nawrocki --- drivers/media/i2c/s5c73m3/s5c73m3-core.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c index d3e867a..402da96 100644 --- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c +++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c @@ -1385,9 +1385,12 @@ static int __s5c73m3_power_off(struct s5c73m3 *state) } return 0; err: - for (++i; i < S5C73M3_MAX_SUPPLIES; i++) - regulator_enable(state->supplies[i].consumer); - + for (++i; i < S5C73M3_MAX_SUPPLIES; i++) { + int r = regulator_enable(state->supplies[i].consumer); + if (r < 0) + v4l2_err(&state->oif_sd, "Failed to reenable %s: %d\n", + state->supplies[i].supply, r); + } return ret; }