From patchwork Mon Jun 19 10:52:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 92596 Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1qBCXQ-004izn-Dp; Mon, 19 Jun 2023 10:55:12 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231190AbjFSKzK (ORCPT + 1 other); Mon, 19 Jun 2023 06:55:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232234AbjFSKya (ORCPT ); Mon, 19 Jun 2023 06:54:30 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 637022115 for ; Mon, 19 Jun 2023 03:52:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687171939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=dt+0PODZOO+NtTEDHv+vY9PVfvH1ItDs1BhkbY8ZW5M=; b=RVmofuIEdSWweMPsRrsGeMFK4A/T1PrFkUb2Rre5buWjmnqSVhfkstjz8DL484LMFZnJLb WaZYrMmQQhKlSf85nkUVX8zfJatHjxZWu5RdD1nST4s2ZHIOZacrNDte86z+H8V9TFdpyF vVrNvAJ3BWeO+ScOgOBqRlbukYazSIA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-235-Pz3pEqbPPg61bFDFbQqMPA-1; Mon, 19 Jun 2023 06:52:16 -0400 X-MC-Unique: Pz3pEqbPPg61bFDFbQqMPA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 98CFC185A78B; Mon, 19 Jun 2023 10:52:15 +0000 (UTC) Received: from x1.localdomain.com (unknown [10.39.193.97]) by smtp.corp.redhat.com (Postfix) with ESMTP id C93A3112132C; Mon, 19 Jun 2023 10:52:13 +0000 (UTC) From: Hans de Goede To: Mauro Carvalho Chehab , Sakari Ailus Cc: Hans de Goede , Tsuchiya Yuto , Andy Shevchenko , Yury Luneff , Nable , andrey.i.trufanov@gmail.com, Fabio Aiuto , Kate Hsuan , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, kernel test robot , Dan Carpenter Subject: [PATCH 1/7] media: atomisp: Fix missing v4l2_fh_release() in atomisp_open() error exit Date: Mon, 19 Jun 2023 12:52:06 +0200 Message-Id: <20230619105212.303653-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,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-media@vger.kernel.org X-LSpam-Score: -4.8 (----) X-LSpam-Report: No, score=-4.8 required=5.0 tests=BAYES_00=-1.9,DKIMWL_WL_HIGH=0.001,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3 autolearn=ham autolearn_force=no Fix missing v4l2_fh_release() in atomisp_open()'s "if (pipe->users)" error exit path. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202306180511.XWN0Hr7F-lkp@intel.com/ Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko --- drivers/staging/media/atomisp/pci/atomisp_fops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c index 54466d2f323a..a09087dccbcb 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_fops.c +++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c @@ -513,8 +513,8 @@ static int atomisp_open(struct file *file) */ if (pipe->users) { dev_dbg(isp->dev, "video node already opened\n"); - mutex_unlock(&isp->mutex); - return -EBUSY; + ret = -EBUSY; + goto error; } /* runtime power management, turn on ISP */