Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1754541pxp; Mon, 7 Mar 2022 01:29:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQor9qhRY0PbMxSuw5WUOXJzu+YFiF2jHJhgIp8ZGPVg0Gl+Wqd0XxAoQUkJ+4o3arT6I6 X-Received: by 2002:aa7:ce94:0:b0:415:a0c7:ce6f with SMTP id y20-20020aa7ce94000000b00415a0c7ce6fmr10026684edv.90.1646645368022; Mon, 07 Mar 2022 01:29:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646645368; cv=none; d=google.com; s=arc-20160816; b=e0471VxesVfg5k7BQAGq/j5iULN/Qy3AS+PwMuyy1aXedAJ01Z6A8+LP/3DQzQLdON 1c4u70qwY8Dk6vA/fKyyT2ctrVJFbiHRN0BY5VPQHbq3TvBdu3G4HS7+teF1SG+4m43I ip6ItC3mhQowIvP0KzUVBoYUoCyOqMzmJhPzqr82ylHr5DyKTXsTHtW8JNBkUzNEIbGB d5vrmu57Q0V8LlRFCxLYp3NDQEJfJV+xFtBX7aDJmhfOIKGKGxk1NJj6ElbVe56y7E0D nAJx8Wjc191FnYpykWNvlFvf5zsLDG1POxvyn6XXjO423mw85WlNrw0LX7Kh9SiyGYXS lYAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=kde993ahLngt9Jqv9wClXjeYPyQ2uhmtm8nM4RJQdHg=; b=ZnFpbCLxGXUxp4H+F9SKhEBzsi65Ckiw9T4MwHOs0zsbCBFJtXnRKuPMGK1M9OlKPb fDEJC4JI1ETSiax6849w87r3UWblY4XOB8TfS/7DSH2tMtyci4zWHZxEtDajG9XTpuSx S2u2icJeW4K8T5o6IocwsUlui6mjlqKwlbPSJl48dsGu2SKNwEuSp5RmkcHtB3g8bGQu GI2r0b4Mrjb69/6V7yQkbMqbhYwDrJKnWxxHCx2APJrLtdEX9W8WaznMHLf0wYbM4Km0 G5x/aT5nAQVCAF7xn7vjeGxJ1r8QhVnahXRzc7cArG+RzvPK0cChJPYH7rbDqrq/RPAc b/vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ba3-20020a0564021ac300b00416463d69f8si1545338edb.580.2022.03.07.01.29.05; Mon, 07 Mar 2022 01:29:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235900AbiCGHoJ (ORCPT + 99 others); Mon, 7 Mar 2022 02:44:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235872AbiCGHoH (ORCPT ); Mon, 7 Mar 2022 02:44:07 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BB5962EE for ; Sun, 6 Mar 2022 23:43:13 -0800 (PST) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4KBr0w6cvxz1GC3Z; Mon, 7 Mar 2022 15:38:24 +0800 (CST) Received: from huawei.com (10.175.112.208) by kwepemi500015.china.huawei.com (7.221.188.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Mon, 7 Mar 2022 15:43:10 +0800 From: Wang Wensheng To: , , , , , CC: Subject: [PATCH -next] soundwire: stream: Fix error return code in do_bank_switch() Date: Mon, 7 Mar 2022 07:40:39 +0000 Message-ID: <20220307074039.117488-1-wangwensheng4@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.112.208] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500015.china.huawei.com (7.221.188.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wang Wensheng --- drivers/soundwire/stream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index 980f26d49b66..553131597af6 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -822,6 +822,7 @@ static int do_bank_switch(struct sdw_stream_runtime *stream) } else if (multi_link) { dev_err(bus->dev, "Post bank switch ops not implemented\n"); + ret = -EINVAL; goto error; } -- 2.17.1