From patchwork Tue Feb 3 01:09:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 5167 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 n1318LcV031257 for ; Tue, 3 Feb 2009 01:09:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753614AbZBCBJG (ORCPT ); Mon, 2 Feb 2009 20:09:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754021AbZBCBJG (ORCPT ); Mon, 2 Feb 2009 20:09:06 -0500 Received: from fg-out-1718.google.com ([72.14.220.157]:44655 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753614AbZBCBJE (ORCPT ); Mon, 2 Feb 2009 20:09:04 -0500 Received: by fg-out-1718.google.com with SMTP id 16so763430fgg.17 for ; Mon, 02 Feb 2009 17:09:04 -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=v2turjneUeqExmTgmykzT3fLZmxVyhQ53gdSxrz+irg=; b=U0vRNTA3pjT5RskSEVLet18z+uvgyrp4/PoS10ssSp3bbAJD+gAY1ZTnarbe0v7t/w 7GcuF3Z7Dh43UUwsfCW0fxsM9vvqKVQtcA4CkuLuP0zn42de5lwRaFeJfUA/llD4B9Bc hrvjmxR2J0/pR5ZuTZPJHvqZXHC5pW8SikJnk= 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=whdc/4p4oyo35i+uBbUHI0t/zPJlEDNdDTQA3Q90CfsKisqz99l+EaUzZ2dnF6vBhe jpnjAk2svhgL//IhGjLqyO4dOnpv+/FaIPZrFthaJcDxxG8pVQMzKOprLW2Q6nPi8/M4 NXygbrPJ5blCFqoIRDZnI+iy9e2OicovY2eh0= Received: by 10.86.92.7 with SMTP id p7mr1298589fgb.54.1233623344080; Mon, 02 Feb 2009 17:09:04 -0800 (PST) Received: from ?192.168.1.42? (gw.zunet.ru [217.67.117.64]) by mx.google.com with ESMTPS id d6sm4077481fga.59.2009.02.02.17.09.03 (version=SSLv3 cipher=RC4-MD5); Mon, 02 Feb 2009 17:09:03 -0800 (PST) Subject: [patch review 7/8] radio-mr800: add few lost mutex locks From: Alexey Klimov To: Douglas Schilling Landgraf Cc: linux-media@vger.kernel.org Date: Tue, 03 Feb 2009 04:09:00 +0300 Message-Id: <1233623340.17456.263.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 5f3bbcc00bcf linux/drivers/media/radio/radio-mr800.c --- a/linux/drivers/media/radio/radio-mr800.c Tue Feb 03 03:05:09 2009 +0300 +++ b/linux/drivers/media/radio/radio-mr800.c Tue Feb 03 03:06:20 2009 +0300 @@ -434,7 +434,10 @@ if (radio->removed) return -EIO; + mutex_lock(&radio->lock); radio->curfreq = f->frequency; + mutex_unlock(&radio->lock); + retval = amradio_setfreq(radio, radio->curfreq); if (retval < 0) amradio_dev_warn(&radio->videodev->dev, @@ -602,7 +605,9 @@ if (!radio) return -ENODEV; + mutex_lock(&radio->lock); radio->users = 0; + mutex_unlock(&radio->lock); if (!radio->removed) { retval = amradio_set_mute(radio, AMRADIO_STOP);