From patchwork Mon Mar 1 16:07:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 389795 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70B09C433DB for ; Mon, 1 Mar 2021 18:07:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F8296541B for ; Mon, 1 Mar 2021 18:07:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239191AbhCASGi (ORCPT ); Mon, 1 Mar 2021 13:06:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:54156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239237AbhCAR7F (ORCPT ); Mon, 1 Mar 2021 12:59:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 92F0F64F11; Mon, 1 Mar 2021 17:48:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614620933; bh=0VApcNbJO8KNfMiuGi0jfvrbmadcMglLwh2nJAtV798=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QaEi1Ja1Jdy5afYQQPD0UcZjKmXQS/F35wfmvk188gQIdUhRPE+kaOZMETeKZ9J/M uIqe3QauV0y66PWTzpvlQeeShEq0cvH7ElfAie12EATMS2M2fttww4RhoLiCsPJAdC URE0GpLSdF9fXbumaiwCiyhm85nTvVC5rz/Nx5R4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Roy Im , Dmitry Torokhov , Sasha Levin Subject: [PATCH 5.11 302/775] Input: da7280 - fix missing error test Date: Mon, 1 Mar 2021 17:07:50 +0100 Message-Id: <20210301161216.546224228@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161201.679371205@linuxfoundation.org> References: <20210301161201.679371205@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dmitry Torokhov [ Upstream commit 1e2020aa0da00051d94c4690c023c45d8f3834bd ] An "if" testing for error condition has accidentally been dropped from the code. Reported-by: kernel test robot Fixes: cd3f609823a5 ("Input: new da7280 haptic driver") Reviewed-by: Roy Im Link: https://lore.kernel.org/r/X9j8lGFgijzHyYZZ@google.com Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/input/misc/da7280.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/misc/da7280.c b/drivers/input/misc/da7280.c index 37568b00873d4..2f698a8c1d650 100644 --- a/drivers/input/misc/da7280.c +++ b/drivers/input/misc/da7280.c @@ -863,6 +863,7 @@ static void da7280_parse_properties(struct device *dev, gpi_str3[7] = '0' + i; haptics->gpi_ctl[i].polarity = 0; error = device_property_read_string(dev, gpi_str3, &str); + if (!error) haptics->gpi_ctl[i].polarity = da7280_haptic_of_gpi_pol_str(dev, str); }