From patchwork Wed May 3 19:31:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 9710319 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9842560351 for ; Wed, 3 May 2017 19:33:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8355F28346 for ; Wed, 3 May 2017 19:33:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75CBE2861C; Wed, 3 May 2017 19:33:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02DC228346 for ; Wed, 3 May 2017 19:33:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756491AbdECTdn (ORCPT ); Wed, 3 May 2017 15:33:43 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:26112 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754361AbdECTdn (ORCPT ); Wed, 3 May 2017 15:33:43 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v43JVorb016081 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 3 May 2017 19:31:51 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v43JVoUe027301 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 3 May 2017 19:31:50 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id v43JVmSo014344; Wed, 3 May 2017 19:31:49 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 03 May 2017 12:31:47 -0700 Date: Wed, 3 May 2017 22:31:40 +0300 From: Dan Carpenter To: Guenter Roeck , Samuel Mendoza-Jonas Cc: Jean Delvare , linux-hwmon@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] hwmon: (pmbus) Add missing break statements Message-ID: <20170503193140.zbxcdgda7k3rnr2m@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: NeoMutt/20170113 (1.7.2) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Static checkers complain about these missing break statements. Fixes: 6eaaea144dc5 ("hwmon: (pmbus) Add client driver for IR35221") Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/hwmon/pmbus/ir35221.c b/drivers/hwmon/pmbus/ir35221.c index cc7b3b542531..00e4a1e264e2 100644 --- a/drivers/hwmon/pmbus/ir35221.c +++ b/drivers/hwmon/pmbus/ir35221.c @@ -129,6 +129,7 @@ static int ir35221_read_word_data(struct i2c_client *client, int page, int reg) case PMBUS_IIN_OC_WARN_LIMIT: ret = pmbus_read_word_data(client, page, reg); ret = ir35221_scale_result(ret, -1, PSC_CURRENT_IN); + break; case PMBUS_READ_VIN: ret = pmbus_read_word_data(client, page, PMBUS_READ_VIN); ret = ir35221_scale_result(ret, -5, PSC_VOLTAGE_IN); @@ -222,6 +223,7 @@ static int ir35221_write_word_data(struct i2c_client *client, int page, int reg, case PMBUS_IIN_OC_WARN_LIMIT: val = ir35221_scale_result(word, 1, PSC_CURRENT_IN); ret = pmbus_write_word_data(client, page, reg, val); + break; default: ret = -ENODATA; break;