[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210520140928.3252671-6-djrscally@gmail.com>
Date: Thu, 20 May 2021 15:09:25 +0100
From: Daniel Scally <djrscally@...il.com>
To: "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Daniel Scally <djrscally@...il.com>,
Wolfram Sang <wsa@...nel.org>,
Lee Jones <lee.jones@...aro.org>,
Hans de Goede <hdegoede@...hat.com>,
Maximilian Luz <luzmaximilian@...il.com>,
linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-gpio@...r.kernel.org,
linux-i2c@...r.kernel.org, platform-driver-x86@...r.kernel.org,
devel@...ica.org
Cc: Len Brown <lenb@...nel.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Russell King <linux@...linux.org.uk>,
Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Mark Gross <mgross@...ux.intel.com>,
Robert Moore <robert.moore@...el.com>,
Erik Kaneda <erik.kaneda@...el.com>,
laurent.pinchart@...asonboard.com, kieran.bingham@...asonboard.com
Subject: [PATCH v4 5/8] clkdev: Make clkdev_drop() null aware
To simplify error handling paths, many functions are no-ops when passed
NULL pointers, for example gpiod_remove_lookup_table(). Mirror that
behaviour for clkdev_drop().
Signed-off-by: Daniel Scally <djrscally@...il.com>
---
Changes since v3:
- Patch introduced
drivers/clk/clkdev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 0f2e3fcf0f19..c082720f8ade 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -286,6 +286,9 @@ EXPORT_SYMBOL(clk_add_alias);
*/
void clkdev_drop(struct clk_lookup *cl)
{
+ if (!cl)
+ return;
+
mutex_lock(&clocks_mutex);
list_del(&cl->node);
mutex_unlock(&clocks_mutex);
--
2.25.1
Powered by blists - more mailing lists