Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753503AbbLYQAt (ORCPT ); Fri, 25 Dec 2015 11:00:49 -0500 Received: from mout.web.de ([212.227.17.11]:54850 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbbLYQAq (ORCPT ); Fri, 25 Dec 2015 11:00:46 -0500 Subject: sata_mv: Another source code review around exception handling? References: <566ABCD9.1060404@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall To: linux-ide@vger.kernel.org, Tejun Heo From: SF Markus Elfring X-Enigmail-Draft-Status: N1110 Message-ID: <567D681E.7050903@users.sourceforge.net> Date: Fri, 25 Dec 2015 17:00:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <566ABCD9.1060404@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:XMAoTEiEO6/w+jFpbLtdirCJeEafzip3WKNh5tIaBrBoF4GO6hB lIZouJX1TTDHhJsagx6tLFaOWkWCJvLLrVbX1nwPResbrrJWNXiqUwftsYzB6d98WHJdBoQ 2i5kBmaOTp8Adw1hka7wt7LqMHzTwW2KSygQwffOtz0Lm/2FY/JrtNTSA7sU0RIYu4FlZdM 4fYBli9UqdDvXIBX/BgTg== X-UI-Out-Filterresults: notjunk:1;V01:K0:s/D05LY71OE=:vybMLcanOfBDLYCIhpNqLl I8/EdAqf3/taGO3SrfkffHRFiGx3K9pkG12ZBbAJWFiz3v9oSBKQUxSUTQcix4Wl+xdlO1wir AybUGpfGXqx+YiklHMMuPZ+hVErk/+D3cV46EjCV+uV3ysKJozyMq/RFoe1S93OLRvi3Zi3MY g6in86DxZufFwq/8UBQ2hEeHakRvtV3fHFcN/9kGNsCqQMUAwnSotJMYMRAUefUlqy1zv3FN4 jp/eOtcNOlP75/z4Gq2onxX6LdXtPmxLUtpfgHaRllhGWldwzVO3RZ3Tg88Pob01n9w7bnITd p4Li2dYIdckEiT613436OR8f3sybQWfcEXsumXQt6NyYou7JDTZPr50Il9a9J1szZogi+1Qor 2nHilIsMvyyul+mX5z6kvGxAEkh/rPM/P1x70tunNQ2yYbjRnuPfg6In0oxxW46wqeS3BmFCZ TGK+M4/cr5UnVBS/tjj9rNKCoyEFsSsgbWcX51uH4gyRbpbROxUsTyPXwRNYdfnWHPYmGlwGK llybtTPzWBdX+8lOnqn6ooFSjlZEwNZeAptsBxZ6GVadFGJ6uOikWzuuRUW86ZDVmqZ+hHwiR fAJFYKxaSE4oJre/1kU89eNcjM+P598IxgoN57/SZ9nYKtONfxlM2Bfah+QgzGIb7AB5cS0Iw vFZcOFdHQ/OHh9h5YO6VCewCAO/6i1ui/0dWwKlxcPmyYOrfL3wgiaNhHcT0Fqsm6EB0/ZkJj dsuZkL+jDmlzKSKlXY1hwiJdkz5Fcw0eEjckJFO7+EILyxuEDbQPHMR7ZKWEC3rrXre2VUAwr p2cTDk+ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1171 Lines: 30 Hello, I have looked at the source file for the Marvell SATA support driver once more. I would appreciate if a specific implementation detail can be clarified there. Static source code analysis can point out that functions like the following are called by the mv_platform_probe() function. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/ata/sata_mv.c?id=80c75a0f1d81922bf322c0634d1e1a15825a89e6#n4055 * ata_host_alloc_pinfo http://lxr.free-electrons.com/source/drivers/ata/libata-core.c?v=4.3#L5768 * devm_kzalloc http://lxr.free-electrons.com/source/include/linux/device.h?v=4.3#L645 The value "-ENOMEM" will be returned if one of these function calls failed. Can it be that any system resources (like memory) are not appropriately released if any calls of this sequence succeeded before the failure? Is the use of the single jump label "err" also suspicious here? Regards, Markus -- 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/