From patchwork Sat May 25 11:25:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sylwester Nawrocki X-Patchwork-Id: 2613261 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id A98B43FD4E for ; Sat, 25 May 2013 11:27:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754881Ab3EYL1b (ORCPT ); Sat, 25 May 2013 07:27:31 -0400 Received: from mail-bk0-f47.google.com ([209.85.214.47]:37649 "EHLO mail-bk0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754195Ab3EYL1a (ORCPT ); Sat, 25 May 2013 07:27:30 -0400 Received: by mail-bk0-f47.google.com with SMTP id jg1so2892621bkc.20 for ; Sat, 25 May 2013 04:27:29 -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=UWjcAy6RSvXvYv/FYKxjjgxsrWVRm4l+//udyDZp7f0=; b=dorYM0a+kd6v17AMKfK7nQLfG0qgRBURvB8/ngsQsNGkxjQg2VWXbhYmZ6R/7y3bxi qhVq40TbFxEr2/rnL325sl89NpMK996uuwUEAg34QkO2T4vAtaJjo61ER7jNeGDuRerr olprb5WkvzxcNn9AvJZZS4SvGUgIxcWmPe3d253gZyJyuqmj7fywpPImAfCP5KBSdqH2 Vo8Uh31jxBMYx+rRUb2yMVXhDPlqxEhodXKibYVC9VSQjjGFH+5VFxadSjSJ+nzJob2r 8i5YPSEfAAv+SlB7CHdL6tq2t3njc9jO89JWNzp+iLUJ4z4m66v35v0akc45ZoD/QZ6K WMzQ== X-Received: by 10.204.116.69 with SMTP id l5mr1077328bkq.163.1369481249424; Sat, 25 May 2013 04:27:29 -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.27.27 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 25 May 2013 04:27:28 -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 3/5] s5p-tv: Do not ignore regulator/clk API return values in sdo_drv.c Date: Sat, 25 May 2013 13:25:53 +0200 Message-Id: <1369481155-30446-4-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 patch fixes following compilation warning: drivers/media/platform/s5p-tv/sdo_drv.c: In function ‘sdo_runtime_resume’: drivers/media/platform/s5p-tv/sdo_drv.c:268:18: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result drivers/media/platform/s5p-tv/sdo_drv.c:269:18: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result Cc: Tomasz Stanislawski Signed-off-by: Sylwester Nawrocki --- drivers/media/platform/s5p-tv/sdo_drv.c | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/s5p-tv/sdo_drv.c b/drivers/media/platform/s5p-tv/sdo_drv.c index ab6f9ef..0afa90f 100644 --- a/drivers/media/platform/s5p-tv/sdo_drv.c +++ b/drivers/media/platform/s5p-tv/sdo_drv.c @@ -262,11 +262,21 @@ static int sdo_runtime_resume(struct device *dev) { struct v4l2_subdev *sd = dev_get_drvdata(dev); struct sdo_device *sdev = sd_to_sdev(sd); + int ret; dev_info(dev, "resume\n"); - clk_enable(sdev->sclk_dac); - regulator_enable(sdev->vdac); - regulator_enable(sdev->vdet); + + ret = clk_enable(sdev->sclk_dac); + if (ret < 0) + return ret; + + ret = regulator_enable(sdev->vdac); + if (ret < 0) + goto dac_clk_dis; + + ret = regulator_enable(sdev->vdet); + if (ret < 0) + goto vdac_r_dis; /* software reset */ sdo_write_mask(sdev, SDO_CLKCON, ~0, SDO_TVOUT_SW_RESET); @@ -285,6 +295,12 @@ static int sdo_runtime_resume(struct device *dev) SDO_COMPENSATION_CVBS_COMP_OFF); sdo_reg_debug(sdev); return 0; + +vdac_r_dis: + regulator_disable(sdev->vdac); +dac_clk_dis: + clk_disable(sdev->sclk_dac); + return ret; } static const struct dev_pm_ops sdo_pm_ops = {