Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752229AbdHRMZA (ORCPT ); Fri, 18 Aug 2017 08:25:00 -0400 Received: from mail-qt0-f169.google.com ([209.85.216.169]:38359 "EHLO mail-qt0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbdHRMYs (ORCPT ); Fri, 18 Aug 2017 08:24:48 -0400 MIME-Version: 1.0 In-Reply-To: <5147288461b861d1b956e1adc3f1d61192086c34.1501610760.git.sathyanarayanan.kuppuswamy@linux.intel.com> References: <5147288461b861d1b956e1adc3f1d61192086c34.1501610760.git.sathyanarayanan.kuppuswamy@linux.intel.com> From: Andy Shevchenko Date: Fri, 18 Aug 2017 15:24:47 +0300 Message-ID: Subject: Re: [RFC v1 2/6] platform/x86: intel_pmc_ipc: Use devm_* calls in driver probe To: Kuppuswamy Sathyanarayanan Cc: "x86@kernel.org" , Ingo Molnar , Zha Qipeng , "H. Peter Anvin" , "dvhart@infradead.org" , Thomas Gleixner , Andy Shevchenko , "linux-kernel@vger.kernel.org" , Platform Driver , Sathyanarayanan Kuppuswamy Natarajan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 771 Lines: 29 On Tue, Aug 1, 2017 at 9:13 PM, wrote: > From: Kuppuswamy Sathyanarayanan > > This patch cleans up unnecessary free/alloc calls in this driver > by using devm_* calls. > static int ipc_plat_remove(struct platform_device *pdev) > { > - struct resource *res; > - > sysfs_remove_group(&pdev->dev.kobj, &intel_ipc_group); > - free_irq(ipcdev.irq, &ipcdev); Can we get an IRQ at any time here? > platform_device_unregister(ipcdev.tco_dev); > platform_device_unregister(ipcdev.punit_dev); > platform_device_unregister(ipcdev.telemetry_dev); > ipcdev.dev = NULL; > return 0; > } -- With Best Regards, Andy Shevchenko