[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZIiHaEn7nW7yAFK8@smile.fi.intel.com>
Date: Tue, 13 Jun 2023 18:12:40 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Michal Wilczynski <michal.wilczynski@...el.com>
Cc: linux-acpi@...r.kernel.org, rafael@...nel.org,
ilpo.jarvinen@...ux.intel.com, pali@...nel.org,
hdegoede@...hat.com, markgross@...nel.org, fengguang.wu@...el.com,
dvhart@...ux.intel.com, platform-driver-x86@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] platform/x86/dell/dell-rbtn: Fix resources leaking on
error path
On Tue, Jun 13, 2023 at 11:43:10AM +0300, Michal Wilczynski wrote:
> Currently rbtn_add() in case of failure is leaking resources. Fix this
> by adding a proper rollback. Move devm_kzalloc() before rbtn_acquire(),
> so it doesn't require rollback in case of failure. While at it, remove
> unnecessary assignment of NULL to device->driver_data and unnecessary
> whitespace, plus add a break for the default case in a switch.
> Suggested-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Isn't also suggested by Pali?
> Fixes: 817a5cdb40c8 ("dell-rbtn: Dell Airplane Mode Switch driver")
> Signed-off-by: Michal Wilczynski <michal.wilczynski@...el.com>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Acked-by: Rafael J. Wysocki <rafael@...nel.org>
...
Hans, can it (an additional tag) be folded into applied change?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists