Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4296913pxj; Wed, 12 May 2021 02:24:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw04sR33/8o8LA5is9rycs82HVaCe4s326Q0a1BbUMP802yVsrOj4CjS6561JqgBtMDbcN2 X-Received: by 2002:a05:6402:199:: with SMTP id r25mr41703265edv.128.1620811457040; Wed, 12 May 2021 02:24:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620811457; cv=none; d=google.com; s=arc-20160816; b=x4OgiSAE5O2SIdox8W0yp4PX9HsDMHTC8AT7hzRl2E6T51j5cS5nm6lCe3b+49Qqor Q02TV1m5ydVBf7fCj57Dy/jn85emyMu3CDBPr6NubNVR5QvwX2o5de62Y6DEiX4XIIzg yjtOkoS9NAJm35C3reiRPpiZedbbG9EkFU11o9CRwk65jTHtK07MozppiJi2trAFiR7R xK6gnBTvfqM6Y8pxp84WyGKq8FyzW7HK57kEY9QUIUIt0Td/uzRKfU/RwLrD/v+/Yjil +iHYeNEQGKtlGBhkNB3YRdQ3gKA6mZrj6IX8GNL7lRvnvOXpquGyDhShefjQNvpnNmf4 puCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=RLUYJyo21iRRobLFue+uM701XKyeW934vfYzjCJE/Yc=; b=mrFCnihM/miPXlOrs56ILluxIocpE5yCsTJfgi5Pxht8SegDtm+ihaubCV1zV+PGoL 2GitGkJEBE5dvX8bhwnbr+k3vZd3MwN/lzTvL4y8W3NTwyFOpNXMSTi/h3VqIopv7ttO Mj9IZTgSorT6I/Hd152xA4l+Ct7A8OMgCdMLNYB+ZrtWw0/iN7YUzKOf4vo5fb/Fn/w2 hhMKbajuUrU4Hvz6DmEX1Jxzy2Xr7fnDPGE051dta3oPoEL3gDSgSkJEnwc2BG5Y1uLY MOrudIz19afxAOsspBZPkxgwXk7XpjhH1asnyywbeNLJfVYzpFGYddxuz9KhhCVZkCqk P83g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id en21si18983158ejc.713.2021.05.12.02.23.53; Wed, 12 May 2021 02:24:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230353AbhELJVr (ORCPT + 99 others); Wed, 12 May 2021 05:21:47 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:2640 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230118AbhELJVq (ORCPT ); Wed, 12 May 2021 05:21:46 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4Fg8NK47D6zld9V; Wed, 12 May 2021 17:18:25 +0800 (CST) Received: from huawei.com (10.175.103.91) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Wed, 12 May 2021 17:20:31 +0800 From: Yang Yingliang To: , CC: , Subject: [PATCH -next] media: omap3isp: add missing unlock on error in isp_subdev_notifier_complete() Date: Wed, 12 May 2021 17:23:01 +0800 Message-ID: <20210512092301.4124736-1-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the missing unlock before return from isp_subdev_notifier_complete() in the error handling case. Fixes: ba689d933361 ("media: omap3isp: Acquire graph mutex for graph traversal") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/platform/omap3isp/isp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index 53025c8c7531..20f59c59ff8a 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -2037,8 +2037,10 @@ static int isp_subdev_notifier_complete(struct v4l2_async_notifier *async) mutex_lock(&isp->media_dev.graph_mutex); ret = media_entity_enum_init(&isp->crashed, &isp->media_dev); - if (ret) + if (ret) { + mutex_unlock(&isp->media_dev.graph_mutex); return ret; + } list_for_each_entry(sd, &v4l2_dev->subdevs, list) { if (sd->notifier != &isp->notifier) -- 2.25.1