[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Nov 2019 14:30:42 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Thierry Reding <thierry.reding@...il.com>,
linux-pwm@...r.kernel.org
Cc: Neil Brown <neilb@...e.de>,
Neil Armstrong <narmstrong@...libre.com>,
kernel@...gutronix.de, kernel-janitors@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/4] pwm: omap-dmtimer: remove pwmchip in .remove before
making it unfunctional
> In the old code (e.g.) mutex_destroy() was called before
> pwmchip_remove(). Between these two calls it is possible that a pwm
> callback is used which tries to grab the mutex.
How do you think about to add a more “imperative mood” for your
change description?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=31f4f5b495a62c9a8b15b1c3581acd5efeb9af8c#n151
> +++ b/drivers/pwm/pwm-omap-dmtimer.c
> @@ -351,6 +351,11 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
> static int pwm_omap_dmtimer_remove(struct platform_device *pdev)
> {
> struct pwm_omap_dmtimer_chip *omap = platform_get_drvdata(pdev);
> + int ret;
> +
> + ret = pwmchip_remove(&omap->chip);
> + if (ret)
> + return ret;
>
> if (pm_runtime_active(&omap->dm_timer_pdev->dev))
> omap->pdata->stop(omap->dm_timer);
How do you think about to use the following statement variant?
+ int ret = pwmchip_remove(&omap->chip);
Regards,
Markus
Powered by blists - more mailing lists