From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13321C43219 for ; Mon, 15 Nov 2021 21:37:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE0BF63215 for ; Mon, 15 Nov 2021 21:37:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350841AbhKOVjv (ORCPT ); Mon, 15 Nov 2021 16:39:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:35520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241153AbhKOSYi (ORCPT ); Mon, 15 Nov 2021 13:24:38 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2580661B48; Mon, 15 Nov 2021 17:54:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1636998846; bh=Yxj6uExrs7do09SRrsWZuvCwYMrKmPc8bdUtWJmX2Qs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VCs0yb/M2qVleDsd/R7HrYJvV1NAhukKoGdKElAkSrjDbVysk3mxJM0W4kRpkjWkp 2qWuK/yljQVbnECSWaM7V5WOBaEwG4OxtcLwzmOGBmXUMfu8c3qnsYjCdn/BRN9gh4 MfjEQdMY9OOexOaYRCp3aP8mfdYQac7fHGx0L3c0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Perrot , Mark Brown , Sasha Levin Subject: [PATCH 5.14 084/849] spi: spl022: fix Microwire full duplex mode Date: Mon, 15 Nov 2021 17:52:47 +0100 Message-Id: <20211115165422.898067522@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211115165419.961798833@linuxfoundation.org> References: <20211115165419.961798833@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Perrot [ Upstream commit d81d0e41ed5fe7229a2c9a29d13bad288c7cf2d2 ] There are missing braces in the function that verify controller parameters, then an error is always returned when the parameter to select Microwire frames operation is used on devices allowing it. Signed-off-by: Thomas Perrot Link: https://lore.kernel.org/r/20211022142104.1386379-1-thomas.perrot@bootlin.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-pl022.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index feebda66f56eb..e4484ace584e4 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -1716,12 +1716,13 @@ static int verify_controller_parameters(struct pl022 *pl022, return -EINVAL; } } else { - if (chip_info->duplex != SSP_MICROWIRE_CHANNEL_FULL_DUPLEX) + if (chip_info->duplex != SSP_MICROWIRE_CHANNEL_FULL_DUPLEX) { dev_err(&pl022->adev->dev, "Microwire half duplex mode requested," " but this is only available in the" " ST version of PL022\n"); - return -EINVAL; + return -EINVAL; + } } } return 0; -- 2.33.0