From patchwork Mon Aug 4 19:27:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schwarzott X-Patchwork-Id: 4673381 Return-Path: X-Original-To: patchwork-linux-media@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 273F19F373 for ; Mon, 4 Aug 2014 19:28:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6878D20136 for ; Mon, 4 Aug 2014 19:28:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4406E20131 for ; Mon, 4 Aug 2014 19:28:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751558AbaHDT2H (ORCPT ); Mon, 4 Aug 2014 15:28:07 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:36497 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750973AbaHDT2G (ORCPT ); Mon, 4 Aug 2014 15:28:06 -0400 Received: from gauss.fritz.box (host-188-174-204-36.customer.m-online.net [188.174.204.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zzam) by smtp.gentoo.org (Postfix) with ESMTPSA id 49546340166; Mon, 4 Aug 2014 19:28:03 +0000 (UTC) From: Matthias Schwarzott To: linux-media@vger.kernel.org, crope@iki.fi, m.chehab@samsung.com Cc: fengguang.wu@intel.com, Matthias Schwarzott Subject: [PATCH] si2165: change return type of si2165_wait_init_done from bool to int Date: Mon, 4 Aug 2014 21:27:43 +0200 Message-Id: <1407180463-17936-1-git-send-email-zzam@gentoo.org> X-Mailer: git-send-email 2.0.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 In case of an error -EINVAL will be mis-casted to 1. This was triggered by a coccinelle warning. Signed-off-by: Matthias Schwarzott --- drivers/media/dvb-frontends/si2165.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-frontends/si2165.c b/drivers/media/dvb-frontends/si2165.c index 3a2d6c5..f02d946 100644 --- a/drivers/media/dvb-frontends/si2165.c +++ b/drivers/media/dvb-frontends/si2165.c @@ -312,9 +312,8 @@ static u32 si2165_get_fe_clk(struct si2165_state *state) return state->adc_clk; } -static bool si2165_wait_init_done(struct si2165_state *state) +static int si2165_wait_init_done(struct si2165_state *state) { - int ret = -EINVAL; u8 val = 0; int i; @@ -326,7 +325,7 @@ static bool si2165_wait_init_done(struct si2165_state *state) } dev_err(&state->i2c->dev, "%s: init_done was not set\n", KBUILD_MODNAME); - return ret; + return -EINVAL; } static int si2165_upload_firmware_block(struct si2165_state *state,