From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 038A8C433DB for ; Tue, 19 Jan 2021 08:52:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A9BA322E00 for ; Tue, 19 Jan 2021 08:52:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728572AbhASIwB (ORCPT ); Tue, 19 Jan 2021 03:52:01 -0500 Received: from mga12.intel.com ([192.55.52.136]:16685 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbhASIvn (ORCPT ); Tue, 19 Jan 2021 03:51:43 -0500 IronPort-SDR: FipACqjkVmBWYPwgEfOd4XR0g7/fUWG1VhaahQtXxnhYGNqAqtXPo8UxA/sBaKwzGw0cNOuzBe dJCkfvujzrZw== X-IronPort-AV: E=McAfee;i="6000,8403,9868"; a="158077570" X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="158077570" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 00:49:51 -0800 IronPort-SDR: E1bgHeIxth2unR7Y9/+ZKbPWF0Dgu0jSZ73lc5I+JnKlpsfu01GBKf56QTKcTQDPZ0tSsy5KTT oc+BzXVAtIJA== X-IronPort-AV: E=Sophos;i="5.79,358,1602572400"; d="scan'208";a="350443947" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 00:49:48 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l1miw-003J3e-D7; Tue, 19 Jan 2021 10:50:50 +0200 Date: Tue, 19 Jan 2021 10:50:50 +0200 From: "andriy.shevchenko@linux.intel.com" To: "Ayyathurai, Vijayakannan" Cc: Daniel Lezcano , "tglx@linutronix.de" , "robh+dt@kernel.org" , "catalin.marinas@arm.com" , "will@kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "mgross@linux.intel.com" , "Wan Mohamad, Wan Ahmad Zainie" , "Raja Subramanian, Lakshmi Bai" , "Seow, Chen Yong" Subject: Re: [PATCH v2 2/2] clocksource: Add Intel Keem Bay Timer Support Message-ID: <20210119085050.GM4077@smile.fi.intel.com> References: <2a7038bc170e31a668995c367bbae018bf805dbe.1609306622.git.vijayakannan.ayyathurai@intel.com> <73330c8b-4633-4a13-b4b5-7405ff1661fe@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 19, 2021 at 02:56:36AM +0000, Ayyathurai, Vijayakannan wrote: ... > > > + data.base = of_iomap(np, 2); > > > + if (!data.base) > > > + return -ENXIO; > > > + > > > + ret = keembay_clocksource_init(np, &data); > > > + if (ret) > > > + goto exit; > > > + > > > + ret = keembay_clockevent_init(np, &data); > > > > Is this missing ? > > > > Yes. Either case it goes to the exit path. So I thought of avoiding this error handling code. The point is that in success you probably won't call keembay_timer_cleanup(). > > if (ret) > > goto exit; > > > > return 0; > > > > > +exit: > > > + keembay_timer_cleanup(np, &data); > > > + > > > + return ret; > > > +} -- With Best Regards, Andy Shevchenko