From patchwork Mon Jul 25 21:50:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 9246903 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 A6A716077C for ; Mon, 25 Jul 2016 21:50:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AE1C25749 for ; Mon, 25 Jul 2016 21:50:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E18B27569; Mon, 25 Jul 2016 21:50:54 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 1D53725749 for ; Mon, 25 Jul 2016 21:50:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755146AbcGYVuw (ORCPT ); Mon, 25 Jul 2016 17:50:52 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:46163 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753879AbcGYVut (ORCPT ); Mon, 25 Jul 2016 17:50:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=Message-Id:Date:Subject:Cc:To:From; bh=T5QyDdX3QTLmaPtK1QCZnEWL2YBH8YSBjSQv6thRNZI=; b=rg3Rf/M9UYWd94gw4DMGDR3AF5 rxuqLTCaikBVzoLWCXhtqg6wFSVDGPknfhDndxKB14ak56lOsL452gKAQxbqI3iypcImnM4uIvLGV k5pU3kyoRJrv2qu3O0sP0Eb4MsdY1TaJ8QO5gusV0toww8Z5SdnuZYTiYY72pkDXt9lrI7QefXK+6 0EqA7qG1eXONScNkUb0MUjjI663HJOIvAw/6ht/uxDyHJzj0XYjwo8SU9f3WbZ1MBgIIwUo+ziMT6 MtxsOkFWNJ5zjaMwCAnlD2kQ26GYdfdXroSJh4n9OxEsTzOEfu0pdXNPCGNzNGy4JOnbBvdm9grOe Tz2faT8g==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:58112 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.86_1) (envelope-from ) id 1bRnlq-002kFb-V7; Mon, 25 Jul 2016 21:50:43 +0000 From: Guenter Roeck To: Hardware Monitoring Cc: Jean Delvare , Guenter Roeck Subject: [PATCH] hwmon: (lm90) Add missing assignment Date: Mon, 25 Jul 2016 14:50:41 -0700 Message-Id: <1469483441-10702-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.5.0 X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: 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 Coverity reports the following error. >>> CID 1364474: Error handling issues (CHECKED_RETURN) >>> Calling "lm90_read_reg" without checking return value (as is done >>> elsewhere 28 out of 29 times). 532 lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH); 533 if (val < 0) 534 return val; Signed-off-by: Guenter Roeck Reviewed-by: Jean Delvare --- drivers/hwmon/lm90.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index f51e758ba529..7b3eedf76c62 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c @@ -529,7 +529,7 @@ static int lm90_update_limits(struct device *dev) return val; data->temp_hyst = val; - lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH); + val = lm90_read_reg(client, LM90_REG_R_REMOTE_LOWH); if (val < 0) return val; data->temp11[REMOTE_LOW] = val << 8;