Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899AbbDDNg7 (ORCPT ); Sat, 4 Apr 2015 09:36:59 -0400 Received: from tex.lwn.net ([70.33.254.29]:35888 "EHLO vena.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752591AbbDDNgz (ORCPT ); Sat, 4 Apr 2015 09:36:55 -0400 Date: Sat, 4 Apr 2015 15:36:47 +0200 From: Jonathan Corbet To: Alexey Khoroshilov Cc: Mauro Carvalho Chehab , ldv-project@linuxtesting.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] [media] marvell-ccic: fix memory leak on failure path in cafe_smbus_setup() Message-ID: <20150404153647.01d475a5@lwn.net> In-Reply-To: <1428106561-12623-1-git-send-email-khoroshilov@ispras.ru> References: <1428106561-12623-1-git-send-email-khoroshilov@ispras.ru> Organization: LWN.net X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 868 Lines: 24 On Sat, 4 Apr 2015 03:16:01 +0300 Alexey Khoroshilov wrote: > If i2c_add_adapter() fails, adap is not deallocated. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Alexey Khoroshilov Actually, the worse thing is that it leaves the IRQ enabled...it's good you moved that lines down. Even better, of course, that the failure path has probably never been run during the life of this driver...:) Should there be some sort of proper reported-by line for the driver verification project? Acked-by: Jonathan Corbet jon -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/