gpiolib: Follow usual pattern for gpiod_remove_lookup_table() call
The usual pattern for the remove calls, like gpiod_remove_lookup_table(), is to be NULL-aware, i.o.w. become a no-op whenever parameter is NULL. Update gpiod_remove_lookup_table() call to follow this pattern. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
Родитель
cb9744178f
Коммит
d321ad1286
|
@ -3460,6 +3460,10 @@ EXPORT_SYMBOL_GPL(gpiod_add_lookup_table);
|
|||
*/
|
||||
void gpiod_remove_lookup_table(struct gpiod_lookup_table *table)
|
||||
{
|
||||
/* Nothing to remove */
|
||||
if (!table)
|
||||
return;
|
||||
|
||||
mutex_lock(&gpio_lookup_lock);
|
||||
|
||||
list_del(&table->list);
|
||||
|
|
Загрузка…
Ссылка в новой задаче