Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp717811pxb; Wed, 6 Oct 2021 13:57:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypCyITtEc9JCu1WeBfkxmWnfvYXwhfUbIliTxkold8W9QMfTEIe+8U6Do403niv33opSgw X-Received: by 2002:a17:906:a044:: with SMTP id bg4mr564324ejb.312.1633553855625; Wed, 06 Oct 2021 13:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633553855; cv=none; d=google.com; s=arc-20160816; b=XYGSY5otodaLpF0xJQTTHTCsDjqdKkSJs3AyrDor0hzEXBHDC6YhWGiOKfo4JhoHrz oFkM8CJdKAUs22LDzUdUiqvxJlPfUP+k2n1IzmKjqg1ra7yLjA2s/lj+Y8KMomuk1qDu MMTjCBcF6BmIxaNpI76fGVLcCQ8iL5aR2wmvzC9AkwjR3TC6+Q8qaJ2O1P1WD5IgMbza 5NxBeNzXecbSTBd6IdpyQ7JMlZJHWG4HiUcQ+bDOeZp3mRrh+1jo24yWt6w31k9DznwZ S671IX+Em7xhz3KoPx60Um32EvLcTQbF1tW7BLNdEn897zBD8ugVTRx9Y/v/RKKtDyHx 09Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :mime-version:user-agent:date:message-id:cc:to:subject:from :dkim-signature:dkim-signature:dkim-signature; bh=rjy7QMx+HG4fzwEuu/i7VAyuESPI+MiqfkC+7VugfOc=; b=g8JMSu+w4r25yHN6nolksu9d+yEg/uKqrudhDzovNyuzyotiOknHtZh4g6BA7UeQek YECPtnetB1Wyf7yl9uN65Q+hxs/dxL2hIY7MdwpehndEM+r6rhm+i3KUi8cMS7TBDW/T 2SOhMtY7YD7x43GIrO5/onuhNs+yjIFdlirK5kufJjngE6mVp9O9WUHh2DP+El4v+wwE 2MkN+qzZSFpJKPrYRAgdvlixdQydl6XgParwyWkbFJkfBUXqQ2TKLDT7d8KUel8QKzsw f5FXp/+Xig5+j6TR7En6mYoixTL8kyuRuxsanRkRh8+1CXz+pQB1+7yWTpDMjgXdpzNd 0DLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mida.se header.s=20191106 header.b=HVebTVJ6; dkim=pass header.i=@mida.se header.s=rsa1 header.b=f47ZhspZ; dkim=neutral (no key) header.i=@mida.se header.s=ed1 header.b=jwsHlhoX; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si33584795edm.216.2021.10.06.13.57.10; Wed, 06 Oct 2021 13:57:35 -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; dkim=pass header.i=@mida.se header.s=20191106 header.b=HVebTVJ6; dkim=pass header.i=@mida.se header.s=rsa1 header.b=f47ZhspZ; dkim=neutral (no key) header.i=@mida.se header.s=ed1 header.b=jwsHlhoX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231749AbhJFU53 (ORCPT + 99 others); Wed, 6 Oct 2021 16:57:29 -0400 Received: from mailrelay3-3.pub.mailoutpod1-cph3.one.com ([46.30.212.12]:51487 "EHLO mailrelay3-3.pub.mailoutpod1-cph3.one.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230043AbhJFU52 (ORCPT ); Wed, 6 Oct 2021 16:57:28 -0400 X-Greylist: delayed 963 seconds by postgrey-1.27 at vger.kernel.org; Wed, 06 Oct 2021 16:57:28 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mida.se; s=20191106; h=content-transfer-encoding:content-type:mime-version:date:message-id:cc:to: subject:from:from; bh=rjy7QMx+HG4fzwEuu/i7VAyuESPI+MiqfkC+7VugfOc=; b=HVebTVJ6FuNdZvEenHlyDKonCoYrZ55xjmjSq0cIwypTfnFD0X8sOB7BJSd2BcA7pRuwqBnJf8nIx 4ShgKTJ0qrpthhH9XJM+d2KoyDgeD6hx+Hskox1O4KYh7imolNH7K3yoyyt1X+dsMYyfBi4+DgdLd3 aWfVyzi8xSHzNeLA+55uTzZ0JuLKrasfaoaAyoadDR7MQvQYh8W+Q4xXo8IScDLl2znT+XAh7e6ZGo xXIvw2mKehd24iGSxnI+8nsniEk9fmOQz/kb2mdTbsqwOldWHuL6W/jBzXb7ToGh9UnN0CLOtbziO6 MnEN2Hu9TggKxcp6NDegO+IhWSFSQ/Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mida.se; s=rsa1; h=content-transfer-encoding:content-type:mime-version:date:message-id:cc:to: subject:from:from; bh=rjy7QMx+HG4fzwEuu/i7VAyuESPI+MiqfkC+7VugfOc=; b=f47ZhspZravyLhK6W3sbPMqzLDAoziAXs74IoRNBj1h9Wk/Ouqy+3wYoL2JvS1ldGy3TZ7qxIyew6 Wd9FwPsaJFttM940wN8+dAqt1Nfeu92KWOiXqARfw6cGVzDGLOwQhhowyVhbtIpG4Q1nChD8yZfdU0 LnpEic0UfpHKRIARcTHMPHOWvqwh74Bmc84BBHrKtWyVFJYYK1b1UdT3zh4Mp+Ak/b0BAJIVCLbGz3 JJYafYRX5XgixG30Fy5lq1iyDddp5b3XImwoTUw777Y52RLEIDjU3k54j3VoMROZKCONfBLDBtPEgc zGOV2Asw+KbdZXvW2WbMnbCfqG1ng7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=mida.se; s=ed1; h=content-transfer-encoding:content-type:mime-version:date:message-id:cc:to: subject:from:from; bh=rjy7QMx+HG4fzwEuu/i7VAyuESPI+MiqfkC+7VugfOc=; b=jwsHlhoXnhQ6d876Rc8LqyV9J8JTO5SyPbiUgZokoSfcBHp9pTZWVDi8PWrH2dw9Ldr/h7TtY4a0s vI9wh4tAw== X-HalOne-Cookie: b74c31112d7684c3e3bff4b64e722478836f3d7b X-HalOne-ID: 815d8d1c-26e5-11ec-87a1-d0431ea8bb03 Received: from [192.168.1.108] (2.67.139.77.mobile.tre.se [2.67.139.77]) by mailrelay3.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPSA id 815d8d1c-26e5-11ec-87a1-d0431ea8bb03; Wed, 06 Oct 2021 20:39:30 +0000 (UTC) From: rkardell Subject: [PATCH] media: dvb: Solve problem with Terratec cinergyT2 when removed and reconnected, or after sleep. To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , linux-kernel@vger.kernel.org Message-ID: Date: Wed, 6 Oct 2021 22:39:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Content-Language: sv-FI Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Module used count is incremented 1 time but decremented 2 times by dvb_frontend. This patch inhibit module used count to go to -1. Signed-off-by: rkl099 --- ?drivers/media/usb/dvb-usb/cinergyT2-core.c | 1 + ?1 file changed, 1 insertion(+) diff --git a/drivers/media/usb/dvb-usb/cinergyT2-core.c b/drivers/media/usb/dvb-usb/cinergyT2-core.c index 23f1093d2..56f58b3f9 100644 --- a/drivers/media/usb/dvb-usb/cinergyT2-core.c +++ b/drivers/media/usb/dvb-usb/cinergyT2-core.c @@ -69,6 +69,7 @@ static int cinergyt2_frontend_attach(struct dvb_usb_adapter *adap) ???? struct cinergyt2_state *st = d->priv; ???? int ret; +??? try_module_get(THIS_MODULE); ???? adap->fe_adap[0].fe = cinergyt2_fe_attach(adap->dev); ???? mutex_lock(&d->data_mutex); -- 2.30.2