From patchwork Fri Aug 23 09:45:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 2848659 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B3FC89F2F4 for ; Fri, 23 Aug 2013 09:45:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E4618200B4 for ; Fri, 23 Aug 2013 09:45:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D623920184 for ; Fri, 23 Aug 2013 09:45:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754151Ab3HWJpg (ORCPT ); Fri, 23 Aug 2013 05:45:36 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:48552 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753724Ab3HWJpf (ORCPT ); Fri, 23 Aug 2013 05:45:35 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r7N9jS0W010988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 23 Aug 2013 09:45:29 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7N9jStG012854 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 23 Aug 2013 09:45:28 GMT Received: from abhmt102.oracle.com (abhmt102.oracle.com [141.146.116.54]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r7N9jRk5007513; Fri, 23 Aug 2013 09:45:27 GMT Received: from elgon.mountain (/41.202.240.13) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 23 Aug 2013 02:45:26 -0700 Date: Fri, 23 Aug 2013 12:45:30 +0300 From: Dan Carpenter To: Guennadi Liakhovetski Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] [media] mx3-camera: locking typo in mx3_videobuf_queue() Message-ID: <20130823094530.GN31293@elgon.mountain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is a return in the middle where we haven't restored the IRQs to their original state. Signed-off-by: Dan Carpenter --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/soc_camera/mx3_camera.c b/drivers/media/platform/soc_camera/mx3_camera.c index 1047e3e..4bae910 100644 --- a/drivers/media/platform/soc_camera/mx3_camera.c +++ b/drivers/media/platform/soc_camera/mx3_camera.c @@ -334,7 +334,7 @@ static void mx3_videobuf_queue(struct vb2_buffer *vb) if (!mx3_cam->active) mx3_cam->active = buf; - spin_unlock_irq(&mx3_cam->lock); + spin_unlock_irqrestore(&mx3_cam->lock, flags); cookie = txd->tx_submit(txd); dev_dbg(icd->parent, "Submitted cookie %d DMA 0x%08x\n", @@ -343,7 +343,7 @@ static void mx3_videobuf_queue(struct vb2_buffer *vb) if (cookie >= 0) return; - spin_lock_irq(&mx3_cam->lock); + spin_lock_irqsave(&mx3_cam->lock, flags); /* Submit error */ list_del_init(&buf->queue);