Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp215310imm; Thu, 12 Jul 2018 17:44:51 -0700 (PDT) X-Google-Smtp-Source: AAOMgpejKJvKgRyYcNPjWwVflLAmymwlOLdQz1j/L2e+39nYuGrrdXzJ/QMebuKNsrS/yfxQMqS8 X-Received: by 2002:a65:5c03:: with SMTP id u3-v6mr3852004pgr.402.1531442691567; Thu, 12 Jul 2018 17:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531442691; cv=none; d=google.com; s=arc-20160816; b=TFgIx8f4cxOv+WfCDpqpV7U6F0ndhY/iYlJbhvsuXn8oI0qEeM1H5ojLOKuG+l8a+j nyXA5jlITIMSDLekxbkQnE9TXrxgpQ1FR3vTkQgqq+Fa3BnaLuYJ9yjLSdIMeIgBO+51 ukHc3u04VTezoAt4xc+HSZhC3uS9euqUD/m62QleWOb+/82QoghyMdMkESg8IeiGROkl h/zVDmHcp5K5iWI6CYu//FD3l1zaqxkD0LauYl2Q1Ij5bfqz8vbWyR0LfPnCkzqGLbeh cFsVODL2bQ2VXBIE8nybD9WbY5cNsG19Uk2Vvd7p6+ChWRHiyHyoDbnlgIY6Er3owJo3 7H/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:arc-authentication-results; bh=v8uPkMS3K8Lzwj7WEOxrDmPcWxXy4ebMFpX0pR1I7f0=; b=NWEX3dYy6p6cd5/eIomoPMrWydpjQHU1RbZdkbuiy80OLwPJqK6hj/w5Ejx8GpmPBq yIl/Aw0F+0088ClaW6hHPLF1orTw+Q7zx0BgD4mraAhkAt29RlywjbZM/G5oqYD2AKHF cVf5yfbviqoOOEpW4xyQpIz8XkXl+7VJZpqZF5lwM7CS/D5YL2pu7kEsz1/b8IxjcxMw nKQuty0My7w8fflk+PUrVBwDKdqo/mNAmw7Vl6ZOnm31ynnpKeZzx9eUNXnWgUaPjbkE 0S9N22LMRjxWBKR6iGhPWFNPSPI5frDDevxHEAgS6rfRXe7A+toQldqbSCNHlx9gRREG wyug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v16-v6si22687237pfm.341.2018.07.12.17.44.36; Thu, 12 Jul 2018 17:44:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387894AbeGMAxl (ORCPT + 99 others); Thu, 12 Jul 2018 20:53:41 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:9613 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387799AbeGMAxl (ORCPT ); Thu, 12 Jul 2018 20:53:41 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7A626A9709DA; Fri, 13 Jul 2018 08:41:23 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.382.0; Fri, 13 Jul 2018 08:41:15 +0800 From: Wei Yongjun To: Benjamin Herrenschmidt , Joel Stanley , Eddie James CC: Wei Yongjun , , Subject: [PATCH -next] fsi: sbefifo: Fix missing unlock on error in sbefifo_dump_ffdc() Date: Fri, 13 Jul 2018 00:50:07 +0000 Message-ID: <1531443007-144851-1-git-send-email-weiyongjun1@huawei.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the missing unlock before return from function sbefifo_dump_ffdc() in the error handling case. Fixes: 9f4a8a2d7f9d ("fsi/sbefifo: Add driver for the SBE FIFO") Signed-off-by: Wei Yongjun --- drivers/fsi/fsi-sbefifo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c index 6b31cc24..35f2749 100644 --- a/drivers/fsi/fsi-sbefifo.c +++ b/drivers/fsi/fsi-sbefifo.c @@ -150,6 +150,7 @@ static void sbefifo_dump_ffdc(struct device *dev, const __be32 *ffdc, u32 w0, w1, w2, i; if (ffdc_sz < 3) { dev_err(dev, "SBE invalid FFDC package size %zd\n", ffdc_sz); + mutex_unlock(&sbefifo_ffdc_mutex); return; } w0 = be32_to_cpu(*(ffdc++));