From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932292AbcGCVeS (ORCPT ); Sun, 3 Jul 2016 17:34:18 -0400 Received: from gloria.sntech.de ([95.129.55.99]:51286 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932163AbcGCVeR (ORCPT ); Sun, 3 Jul 2016 17:34:17 -0400 From: Heiko Stuebner To: Sudip Mukherjee Cc: Kishon Vijay Abraham I , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: Re: [PATCH] phy: rockhip-usb: use devm_add_action_or_reset() Date: Sun, 03 Jul 2016 23:34:07 +0200 Message-ID: <2045236.FJVOO9eQKE@phil> User-Agent: KMail/4.14.10 (Linux/4.3.0-1-amd64; KDE/4.14.14; x86_64; ; ) In-Reply-To: <1467579666-9179-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1467579666-9179-1-git-send-email-sudipm.mukherjee@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Sonntag, 3. Juli 2016, 22:01:06 schrieb Sudip Mukherjee: > If devm_add_action() fails we are explicitly calling the cleanup to free > the resources allocated. Lets use the helper devm_add_action_or_reset() > and return directly in case of error, as we know that the cleanup function > has been already called by the helper if there was any error. > > Signed-off-by: Sudip Mukherjee a nice new helper this devm_add_action_or_reset. Reviewed-by: Heiko Stuebner