From patchwork Tue Aug 11 21:40:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jamie Lentin X-Patchwork-Id: 6994901 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 791A1C05AC for ; Tue, 11 Aug 2015 22:21:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A3600206C3 for ; Tue, 11 Aug 2015 22:21:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C5327205B5 for ; Tue, 11 Aug 2015 22:21:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753122AbbHKWUf (ORCPT ); Tue, 11 Aug 2015 18:20:35 -0400 Received: from marmot.wormnet.eu ([188.246.204.87]:60528 "EHLO marmot.wormnet.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932371AbbHKWTz (ORCPT ); Tue, 11 Aug 2015 18:19:55 -0400 Received: from [80.229.158.163] (helo=gonzo.vandergast.wormnet.eu) by marmot.wormnet.eu with esmtpa (Exim 4.84) (envelope-from ) id 1ZPHIC-0004gn-Mw; Tue, 11 Aug 2015 22:41:08 +0100 From: Jamie Lentin To: Jiri Kosina Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Jamie Lentin Subject: [PATCH 2/3] HID: lenovo: Add missing return-value check Date: Tue, 11 Aug 2015 22:40:51 +0100 Message-Id: <1439329252-16809-3-git-send-email-jm@lentin.co.uk> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1439329252-16809-1-git-send-email-jm@lentin.co.uk> References: <1439329252-16809-1-git-send-email-jm@lentin.co.uk> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.1 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 Signed-off-by: Jamie Lentin --- drivers/hid/hid-lenovo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c index 65df414..265bfe2 100644 --- a/drivers/hid/hid-lenovo.c +++ b/drivers/hid/hid-lenovo.c @@ -178,9 +178,12 @@ static void lenovo_features_set_cptkbd(struct hid_device *hdev) struct lenovo_drvdata_cptkbd *cptkbd_data = hid_get_drvdata(hdev); ret = lenovo_send_cmd_cptkbd(hdev, 0x05, cptkbd_data->fn_lock); - ret = lenovo_send_cmd_cptkbd(hdev, 0x02, cptkbd_data->sensitivity); if (ret) hid_err(hdev, "Fn-lock setting failed: %d\n", ret); + + ret = lenovo_send_cmd_cptkbd(hdev, 0x02, cptkbd_data->sensitivity); + if (ret) + hid_err(hdev, "Sensitivity setting failed: %d\n", ret); } static ssize_t attr_fn_lock_show_cptkbd(struct device *dev,