Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752468AbbL1QK7 (ORCPT ); Mon, 28 Dec 2015 11:10:59 -0500 Received: from mail-yk0-f170.google.com ([209.85.160.170]:35938 "EHLO mail-yk0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751250AbbL1QKz (ORCPT ); Mon, 28 Dec 2015 11:10:55 -0500 Date: Mon, 28 Dec 2015 11:10:54 -0500 From: Tejun Heo To: SF Markus Elfring Cc: linux-ide@vger.kernel.org, LKML , kernel-janitors@vger.kernel.org, Julia Lawall Subject: Re: sata_mv: Another source code review around exception handling? Message-ID: <20151228161054.GR5003@mtj.duckdns.org> References: <566ABCD9.1060404@users.sourceforge.net> <567D681E.7050903@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <567D681E.7050903@users.sourceforge.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 916 Lines: 25 Hello, On Fri, Dec 25, 2015 at 05:00:30PM +0100, SF Markus Elfring wrote: > 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? Most of those are managed resources (devm_, pcim_ and so on) and are released automatically when the driver detaches from the device. > Is the use of the single jump label "err" also suspicious here? And that exit label deal with resources which aren't managed - some just haven't grown managed variant yet while others don't fit the model too well. Thanks. -- tejun -- 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/