From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753772AbcGSPb1 (ORCPT ); Tue, 19 Jul 2016 11:31:27 -0400 Received: from down.free-electrons.com ([37.187.137.238]:51292 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753468AbcGSPbX (ORCPT ); Tue, 19 Jul 2016 11:31:23 -0400 Date: Tue, 19 Jul 2016 17:31:21 +0200 From: Alexandre Belloni To: Sudip Mukherjee Cc: Alessandro Zummo , linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com Subject: Re: [PATCH] rtc: m41t80: use devm_add_action_or_reset() Message-ID: <20160719153121.GI7132@piout.net> References: <1467577138-30453-1-git-send-email-sudipm.mukherjee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1467577138-30453-1-git-send-email-sudipm.mukherjee@gmail.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/07/2016 at 21:18:58 +0100, Sudip Mukherjee wrote : > 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 > --- > drivers/rtc/rtc-m41t80.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > Applied, thanks. -- Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com