From patchwork Sun Jul 18 18:34:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 112611 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6IIarTV024842 for ; Sun, 18 Jul 2010 18:37:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757026Ab0GRSgc (ORCPT ); Sun, 18 Jul 2010 14:36:32 -0400 Received: from mail.pripojeni.net ([217.66.174.14]:58321 "EHLO smtp.pripojeni.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1756994Ab0GRSgb (ORCPT ); Sun, 18 Jul 2010 14:36:31 -0400 Received: from bellona ([217.66.174.142]) by smtp.pripojeni.net (Kerio Connect 7.0.0 patch 1); Sun, 18 Jul 2010 20:34:21 +0200 From: Jiri Slaby To: mchehab@infradead.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, jirislaby@gmail.com, Markus Rechberger Subject: [PATCH 1/1] DVB: fix dvr node refcounting Date: Sun, 18 Jul 2010 20:34:18 +0200 Message-Id: <1279478058-974-1-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.7.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 18 Jul 2010 18:37:27 +0000 (UTC) diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c index 425862f..0042306 100644 --- a/drivers/media/dvb/dvb-core/dmxdev.c +++ b/drivers/media/dvb/dvb-core/dmxdev.c @@ -207,7 +207,7 @@ static int dvb_dvr_release(struct inode *inode, struct file *file) } /* TODO */ dvbdev->users--; - if(dvbdev->users==-1 && dmxdev->exit==1) { + if (dvbdev->users == 1 && dmxdev->exit == 1) { fops_put(file->f_op); file->f_op = NULL; mutex_unlock(&dmxdev->mutex);