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: 25675 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 27D4720540 for ; Tue, 4 Mar 2014 09:40:37 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id x10sf12790228pdj.10 for ; Tue, 04 Mar 2014 01:40:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=Jgmrf0VyTIh7fl78BlCLsdT5JeS1Cg53oI93rYXWo4E=; b=TbbGDXMcfcDF4p+VFax41fnF1Z+uqxkC5qB4aKCnGZDr3zIs+rmaug+N17hGG+TnBw 9HhiepKvpGSLxllhDAxn3614n5XJWZ7ZhX/nFsXzFJEC5o/59AJbE75w/FevPknn88FW nNSf3wXs61HHXP4Y1GNQzFxpQ8qHjba8JQ93jDytuuzCauqCvc0b5UdufVTCbQPcjSMQ K0l+WxCuG55t4dY4ukGbIl2aGcdI/OYOE1ShdPlnTruBNd0ss7xEZYycMPYW9GVu4w5/ YYt2f3zEOxDuSNnsqy2wPkESrFhmWvtv3++zAGxeZOReYEwwgxZ5iRrIidRDDim+3qzp ELyQ== X-Gm-Message-State: ALoCoQljY8aH3drhUrYGEfbgiv9p5xcknI6G3cEC+1QcsKuUfaj6k4zKn/K0QE6pRph/wTZnhqLD X-Received: by 10.68.197.73 with SMTP id is9mr10457985pbc.0.1393926036100; Tue, 04 Mar 2014 01:40:36 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.33.203 with SMTP id j69ls2386284qgj.27.gmail; Tue, 04 Mar 2014 01:40:36 -0800 (PST) X-Received: by 10.52.250.198 with SMTP id ze6mr91880vdc.55.1393926035980; Tue, 04 Mar 2014 01:40:35 -0800 (PST) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id xs6si4099881vec.116.2014.03.04.01.40.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Mar 2014 01:40:35 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id pa12so5410696veb.15 for ; Tue, 04 Mar 2014 01:40:35 -0800 (PST) X-Received: by 10.52.161.130 with SMTP id xs2mr93724vdb.49.1393926035873; Tue, 04 Mar 2014 01:40:35 -0800 (PST) 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.130.193 with SMTP id u1csp114948vcs; Tue, 4 Mar 2014 01:40:35 -0800 (PST) X-Received: by 10.68.196.226 with SMTP id ip2mr24666790pbc.106.1393926035039; Tue, 04 Mar 2014 01:40:35 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ub8si2428588pac.68.2014.03.04.01.40.34; Tue, 04 Mar 2014 01:40:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-watchdog-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756664AbaCDJke (ORCPT + 1 other); Tue, 4 Mar 2014 04:40:34 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:56211 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756452AbaCDJkd (ORCPT ); Tue, 4 Mar 2014 04:40:33 -0500 Received: by mail-pa0-f48.google.com with SMTP id hz1so361356pad.35 for ; Tue, 04 Mar 2014 01:40:32 -0800 (PST) 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-watchdog-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-watchdog@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=neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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: , 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) {