diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-03-18 16:03:17 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-24 10:26:31 +0300 |
commit | fde046a8c490e296aacbb628748664fa54b6bdde (patch) | |
tree | f094a1c8ac20ca9c075014765c339974fd6bd907 /drivers/pps/clients | |
parent | 1a8fc4f7e21ce786f8ebdf26d631e6f359ff9dfd (diff) | |
download | linux-fde046a8c490e296aacbb628748664fa54b6bdde.tar.xz |
pps: clients: gpio: Remove redundant condition in ->remove()
The timer along with GPIO API are NULL-aware, there is no need to test
against existing GPIO echo line.
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210318130321.24227-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pps/clients')
-rw-r--r-- | drivers/pps/clients/pps-gpio.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c index 78c9680e8063..dc9ed6fc3dae 100644 --- a/drivers/pps/clients/pps-gpio.c +++ b/drivers/pps/clients/pps-gpio.c @@ -240,11 +240,9 @@ static int pps_gpio_remove(struct platform_device *pdev) struct pps_gpio_device_data *data = platform_get_drvdata(pdev); pps_unregister_source(data->pps); - if (data->echo_pin) { - del_timer_sync(&data->echo_timer); - /* reset echo pin in any case */ - gpiod_set_value(data->echo_pin, 0); - } + del_timer_sync(&data->echo_timer); + /* reset echo pin in any case */ + gpiod_set_value(data->echo_pin, 0); dev_info(&pdev->dev, "removed IRQ %d as PPS source\n", data->irq); return 0; } |