From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935125AbdBQWMq (ORCPT ); Fri, 17 Feb 2017 17:12:46 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:33048 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934956AbdBQWMo (ORCPT ); Fri, 17 Feb 2017 17:12:44 -0500 Date: Sat, 18 Feb 2017 01:12:19 +0300 From: Dan Carpenter To: Colin King Cc: Jarod Wilson , Mauro Carvalho Chehab , Greg Kroah-Hartman , Mihaela Muraru , RitwikGopi , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [media] Staging: media/lirc: don't call put_ir_rx on rx twice Message-ID: <20170217221219.GF4108@mwanda> References: <20170217161730.31908-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170217161730.31908-1-colin.king@canonical.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This one is a false positive. The original code is correct. I was looking through my mail boxes to see the history of this and why it hadn't been fixed earlier. Someone tried to fix it in 2011: https://www.spinics.net/lists/linux-driver-devel/msg17403.html Then I complained about it again in 2014 when I was looking at a different bug in that same function. Now you're the third person to think this code is suspicious. I think part of the problem is that get_ir_rx(ir) is hidden as a function parameter instead of on its own line. But really even that wouldn't totally fix the issue. regards, dan carpenter