From patchwork Thu Mar 28 18:37:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10875695 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 21A24139A for ; Thu, 28 Mar 2019 18:37:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AC5128D37 for ; Thu, 28 Mar 2019 18:37:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F343C28EA0; Thu, 28 Mar 2019 18:37:31 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E6F028D37 for ; Thu, 28 Mar 2019 18:37:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726242AbfC1Sha (ORCPT ); Thu, 28 Mar 2019 14:37:30 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34808 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbfC1Sha (ORCPT ); Thu, 28 Mar 2019 14:37:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=lPmDLxKg/uTMb2IH4189A+J6GZedGkJCwG4ugVxCwWU=; b=EkMYZpOE+lY2esJ75G4VUW132 PvJHOHgPHBRhBARH4HQIaTFJrGAdC8lg0uDNmqb+Q0op6x0aHp6qxyfunF57w0Asg8iFPYnVSzPBK oLLrJyV2h5eC9ZIB0hIeVK7zaLxf/tFuH/3/3/LbIyH1H6kSu34pKsJ61si6GxBA4ML4VfUZ/xd9f bmxSFaYYcpm6tMz/t26ZpGUM0jf8JdRu8oNTwyzWO3QnGPARwvNXIqQaVe3DShvhVwx3TfSI0bckn AwMKgdvbqyDSQpsT8Wk3qXEmdfxE265RcfsgbcK8UXYWTCOjf3sfw90+DdqJG8R0svKQJu5lVzLou TTAg4fX5w==; Received: from [179.183.99.176] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9Zu5-0003Bo-Qx; Thu, 28 Mar 2019 18:37:29 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.92) (envelope-from ) id 1h9Ztz-00025c-Fv; Thu, 28 Mar 2019 14:37:23 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Hans Verkuil , Max Kellermann , Kees Cook , Sakari Ailus Subject: [PATCH] media: dvbdev: remove double-unlock Date: Thu, 28 Mar 2019 14:37:22 -0400 Message-Id: <122d0e8dd050cc5dc3fb9e9b5f2dee3c5276ce35.1553798238.git.mchehab+samsung@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As warned by smatch: drivers/media/dvb-core/dvbdev.c: drivers/media/dvb-core/dvbdev.c:529 dvb_register_device() error: double unlock 'sem:&minor_rwsem' Reported-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvbdev.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index 4a5834a1c3b7..a3393cd4e584 100644 --- a/drivers/media/dvb-core/dvbdev.c +++ b/drivers/media/dvb-core/dvbdev.c @@ -526,7 +526,6 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, dvb_media_device_free(dvbdev); kfree(dvbdevfops); kfree(dvbdev); - up_write(&minor_rwsem); mutex_unlock(&dvbdev_register_lock); return ret; }