From patchwork Sun Feb 8 13:28:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 6091 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n18DSNBF003857 for ; Sun, 8 Feb 2009 13:28:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752672AbZBHN2X (ORCPT ); Sun, 8 Feb 2009 08:28:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752684AbZBHN2X (ORCPT ); Sun, 8 Feb 2009 08:28:23 -0500 Received: from fg-out-1718.google.com ([72.14.220.155]:39192 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752672AbZBHN2W (ORCPT ); Sun, 8 Feb 2009 08:28:22 -0500 Received: by fg-out-1718.google.com with SMTP id 16so881205fgg.17 for ; Sun, 08 Feb 2009 05:28:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=TUAxQrRQpKhOGsY24+veosP89e/J1hcQ59VIcScVdS4=; b=wCXuAdK4he29uHr6I8SuHlVbqJa8ToGjmUHbgmkSEzOCSwkfwQk27IPWJLq3EFtVpU EcUgfwg9vRtV5uv+g5s9OFPEnpNVag+tXqTdq6q3l7B9yqmtnw/qZ01sihgbWE2B/XKa SenYpPjQEhlIQRwD9rKFGpQOpe09p2uTzbdVc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=sJiyQl/1FdL+uJ8VDx65cxL7kZRUR6YR7s50TDy7gQJiPBO7M5D/m+XX6S0ph/h72D UIURMaUMTFQ7bv6HiAx4BpnmszF0nX6FVOVZzGRyJCLbT4vM3rvCsMAlYaM5DvOwy+fQ uY0dNirZGADtvqSYBaip5ma57G8U6lwxZPEug= Received: by 10.86.51.10 with SMTP id y10mr2143224fgy.9.1234099700560; Sun, 08 Feb 2009 05:28:20 -0800 (PST) Received: from ?192.168.1.42? (gw.zunet.ru [217.67.117.64]) by mx.google.com with ESMTPS id l12sm553956fgb.41.2009.02.08.05.28.19 (version=SSLv3 cipher=RC4-MD5); Sun, 08 Feb 2009 05:28:20 -0800 (PST) Subject: [patch] dsbr100: add few lost mutex locks From: Alexey Klimov To: Douglas Schilling Landgraf Cc: linux-media@vger.kernel.org Date: Sun, 08 Feb 2009 16:28:27 +0300 Message-Id: <1234099707.10910.2.camel@tux.localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Patch adds two lost mutex locks. Signed-off-by: Alexey Klimov diff -r 71e5a36634ea linux/drivers/media/radio/dsbr100.c --- a/linux/drivers/media/radio/dsbr100.c Mon Feb 02 10:33:31 2009 +0100 +++ b/linux/drivers/media/radio/dsbr100.c Sun Feb 08 16:24:34 2009 +0300 @@ -455,7 +455,10 @@ if (radio->removed) return -EIO; + mutex_lock(&radio->lock); radio->curfreq = f->frequency; + mutex_unlock(&radio->lock); + retval = dsbr100_setfreq(radio, radio->curfreq); if (retval < 0) dev_warn(&radio->usbdev->dev, "Set frequency failed\n"); @@ -606,7 +609,10 @@ if (!radio) return -ENODEV; + mutex_lock(&radio->lock); radio->users = 0; + mutex_unlock(&radio->lock); + if (!radio->removed) { retval = dsbr100_stop(radio); if (retval < 0) {