From patchwork Tue Jan 2 04:08:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 10139915 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 CE93960362 for ; Tue, 2 Jan 2018 04:02:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AFD2E289F2 for ; Tue, 2 Jan 2018 04:02:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A43D4289F4; Tue, 2 Jan 2018 04:02:52 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC779289F2 for ; Tue, 2 Jan 2018 04:02:51 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E3BB6267208; Tue, 2 Jan 2018 05:02:49 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2329226726B; Tue, 2 Jan 2018 05:02:49 +0100 (CET) Received: from huawei.com (unknown [45.249.212.32]) by alsa0.perex.cz (Postfix) with ESMTP id 9AF98266FDE for ; Tue, 2 Jan 2018 05:02:46 +0100 (CET) Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D3E906EAE0152; Tue, 2 Jan 2018 12:02:30 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.361.1; Tue, 2 Jan 2018 12:02:23 +0800 From: Wei Yongjun To: Vinod Koul , Sanyog Kale Date: Tue, 2 Jan 2018 04:08:19 +0000 Message-ID: <1514866099-108711-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Cc: alsa-devel@alsa-project.org, Wei Yongjun , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH -next] soundwire: Fix typo in return value check of sdw_read() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the typo, 'status' should be instead of 'status2'. Fixes: b0a9c37b0178 ("soundwire: Add slave status handling") Signed-off-by: Wei Yongjun Acked-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 4c34519..266d2b3 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -671,8 +671,8 @@ static int sdw_handle_dp0_interrupt(struct sdw_slave *slave, u8 *slave_status) status2 = sdw_read(slave, SDW_DP0_INT); if (status2 < 0) { dev_err(slave->bus->dev, - "SDW_DP0_INT read failed:%d", status); - return status; + "SDW_DP0_INT read failed:%d", status2); + return status2; } status &= status2; @@ -741,10 +741,10 @@ static int sdw_handle_port_interrupt(struct sdw_slave *slave, /* Read DPN interrupt again */ status2 = sdw_read(slave, addr); - if (status < 0) { + if (status2 < 0) { dev_err(slave->bus->dev, - "SDW_DPN_INT read failed:%d", status); - return status; + "SDW_DPN_INT read failed:%d", status2); + return status2; } status &= status2;