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 X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 BF883C433E2 for ; Mon, 20 Jul 2020 16:11:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A8112065E for ; Mon, 20 Jul 2020 16:11:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595261498; bh=xm9UZW9zAD+VA4H6R+EB34yC3IghtWXpFJKcdYMmkao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=PWwx21gFk8YeL2TRYTkt8GOVpb37Yubfuaxn8XCUt1sZuBUMs2DNb1YCoGgPBOu3Z TQyn069UJwq48oSPiHokYDF6YnNP9DNan7HGKb1kI9rn7MkIYOeY8R+367hI+BPn4/ SBtUpgA0jq3QUrB6Erio0D1PADJmUfXodeKQZdm8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733283AbgGTQLh (ORCPT ); Mon, 20 Jul 2020 12:11:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:50600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387810AbgGTQL3 (ORCPT ); Mon, 20 Jul 2020 12:11:29 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EDF2C2176B; Mon, 20 Jul 2020 16:11:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595261489; bh=xm9UZW9zAD+VA4H6R+EB34yC3IghtWXpFJKcdYMmkao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=anCKpH0UN9GwxK4ntWlC2+TaocjjzIvamMupZcWlFzffV63CmWwz5XYDO9g0tCN9m Ps50mbgT8XNVEi/nl520w/wFQ4zbM4/SegCBn56A+n/4m8SnJ+Xsr8Udayd6vrdZ5g OYosOMT7jKewlhKdvWez8249aqENKjd4vNa341vk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miquel Raynal , Boris Brezillon Subject: [PATCH 5.7 134/244] mtd: rawnand: marvell: Fix the condition on a return code Date: Mon, 20 Jul 2020 17:36:45 +0200 Message-Id: <20200720152832.221673103@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200720152825.863040590@linuxfoundation.org> References: <20200720152825.863040590@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Miquel Raynal commit c27075772d1f1c8aaf276db9943b35adda8a8b65 upstream. In a previous fix, I changed the condition on which the timeout of an IRQ is reached from: if (!ret) into: if (ret && !pending) While having a non-zero return code is usual in the Linux kernel, here ret comes from a wait_for_completion_timeout() which returns 0 when the waiting period is too long. Hence, the revised condition should be: if (!ret && !pending) The faulty patch did not produce any error because of the !pending condition so this change is finally purely cosmetic and does not change the actual driver behavior. Fixes: cafb56dd741e ("mtd: rawnand: marvell: prevent timeouts on a loaded machine") Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200424164501.26719-2-miquel.raynal@bootlin.com Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/raw/marvell_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mtd/nand/raw/marvell_nand.c +++ b/drivers/mtd/nand/raw/marvell_nand.c @@ -707,7 +707,7 @@ static int marvell_nfc_wait_op(struct na * In case the interrupt was not served in the required time frame, * check if the ISR was not served or if something went actually wrong. */ - if (ret && !pending) { + if (!ret && !pending) { dev_err(nfc->dev, "Timeout waiting for RB signal\n"); return -ETIMEDOUT; }