From patchwork Tue Mar 4 09:34:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 3760511 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 296599F376 for ; Tue, 4 Mar 2014 09:40:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D4D1203DC for ; Tue, 4 Mar 2014 09:40:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5BCD1203B6 for ; Tue, 4 Mar 2014 09:40:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756452AbaCDJke (ORCPT ); Tue, 4 Mar 2014 04:40:34 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:44429 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756569AbaCDJkd (ORCPT ); Tue, 4 Mar 2014 04:40:33 -0500 Received: by mail-pa0-f46.google.com with SMTP id kp14so4931701pab.19 for ; Tue, 04 Mar 2014 01:40:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ES8m+iofhbt9veFLBO331H+PFVSDERu5mIeVw+Arops=; b=FRkvEac8Jz9fg/PN7uJ0F/DkGKMtQ4SBI7YhM9OA6Cd1dFb+7WU1LokAJRw/IlOSG7 V/hOp/FcFlFq8AhP+8ZaRiNkUuegyw7J4GKRsSzxd/Zq8ezDGw8hg+YIyF7BFgjd7gIP R8q/c5qrGAxxT2ECxleeIpAHsJEN4K2xQafoLyPVjEy1J3hDfEoM4EvNNjhI36gGX07P MrG3RT7odq7rzxVBCzcRh/uOgJLigYDUugG0YGRM2UHcbB34FU+kF7+trTkqCu+o1MBU zz1SyLGqjQtYzRdl9Ftmhy6um1dKIP7Av/hLuU8wEuffqrkn5Gli6KkN6pm5pDLL7JTo cduw== X-Gm-Message-State: ALoCoQlOtWI+kdMLk/tIMItwf9K88JEhH3ZntwIfPUTGJWzeMMHoprd+k+N6uysBGYAHWMbMosQ6 X-Received: by 10.66.160.225 with SMTP id xn1mr4969351pab.108.1393926032417; Tue, 04 Mar 2014 01:40:32 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id gj9sm45620806pbc.7.2014.03.04.01.40.28 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Mar 2014 01:40:31 -0800 (PST) From: Sachin Kamat To: linux-watchdog@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org, wim@iguana.be, sachin.kamat@linaro.org Subject: [PATCH 2/2] watchdog: s3c2410_wdt: Check return value of clk_prepare_enable Date: Tue, 4 Mar 2014 15:04:35 +0530 Message-Id: <1393925675-21636-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1393925675-21636-1-git-send-email-sachin.kamat@linaro.org> References: <1393925675-21636-1-git-send-email-sachin.kamat@linaro.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP clk_prepare_enable can fail. Check its return value. Signed-off-by: Sachin Kamat --- drivers/watchdog/s3c2410_wdt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index a0f8f771adec..7c6ccd071baf 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c @@ -525,7 +525,11 @@ static int s3c2410wdt_probe(struct platform_device *pdev) goto err; } - clk_prepare_enable(wdt->clock); + ret = clk_prepare_enable(wdt->clock); + if (ret < 0) { + dev_err(dev, "failed to enable clock\n"); + return ret; + } ret = s3c2410wdt_cpufreq_register(wdt); if (ret < 0) {