From patchwork Tue Jan 2 01:46:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 10139873 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 D136160362 for ; Tue, 2 Jan 2018 01:40:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2868205F8 for ; Tue, 2 Jan 2018 01:40:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B707D22B27; Tue, 2 Jan 2018 01:40:42 +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 2F53D205F8 for ; Tue, 2 Jan 2018 01:40:42 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0EF68267148; Tue, 2 Jan 2018 02:40:33 +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 777BC26717C; Tue, 2 Jan 2018 02:40:32 +0100 (CET) Received: from huawei.com (szxga05-in.huawei.com [45.249.212.191]) by alsa0.perex.cz (Postfix) with ESMTP id F1934267141 for ; Tue, 2 Jan 2018 02:40:27 +0100 (CET) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D70CFD41B617C; Tue, 2 Jan 2018 09:40:11 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.361.1; Tue, 2 Jan 2018 09:40:04 +0800 From: Wei Yongjun To: Srinivas Kandagatla , Sagar Dharia Date: Tue, 2 Jan 2018 01:46:00 +0000 Message-ID: <1514857560-83934-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] slimbus: Fix missing unlock on error in slim_msg_response() 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 Add the missing unlock before return from function slim_msg_response() in the error handling case. Fixes: afbdcc7c384b ("slimbus: Add messaging APIs to slimbus framework") Signed-off-by: Wei Yongjun --- drivers/slimbus/messaging.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/slimbus/messaging.c b/drivers/slimbus/messaging.c index 755462a..a1328ac 100644 --- a/drivers/slimbus/messaging.c +++ b/drivers/slimbus/messaging.c @@ -38,6 +38,7 @@ void slim_msg_response(struct slim_controller *ctrl, u8 *reply, u8 tid, u8 len) if (msg == NULL || msg->rbuf == NULL) { dev_err(ctrl->dev, "Got response to invalid TID:%d, len:%d\n", tid, len); + spin_unlock_irqrestore(&ctrl->txn_lock, flags); return; }