* [PATCH] scsi: ufs: Check workqueue exists before destroying it
@ 2018-08-02 0:14 Matthias Kaehlcke
2018-08-07 17:09 ` Evan Green
2018-08-08 6:24 ` Stephen Boyd
0 siblings, 2 replies; 4+ messages in thread
From: Matthias Kaehlcke @ 2018-08-02 0:14 UTC (permalink / raw)
To: Vinayak Holikatti, James E . J . Bottomley, Martin K . Petersen,
Subhash Jadavani
Cc: linux-scsi, linux-kernel, Evan Green, Douglas Anderson,
Stephen Boyd, Matthias Kaehlcke
In ufshcd_hba_exit() the clock gating workqueue is always destroyed
when clock gating is supported. However the workqueue pointer is NULL
when ufshcd_init() fails before the workqueue is created. Only destroy
the workqueue if it exists.
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
drivers/scsi/ufs/ufshcd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 397081d320b1..401f7dbe2981 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -7190,7 +7190,8 @@ static void ufshcd_hba_exit(struct ufs_hba *hba)
if (ufshcd_is_clkscaling_supported(hba)) {
if (hba->devfreq)
ufshcd_suspend_clkscaling(hba);
- destroy_workqueue(hba->clk_scaling.workq);
+ if (hba->clk_scaling.workq)
+ destroy_workqueue(hba->clk_scaling.workq);
ufshcd_devfreq_remove(hba);
}
ufshcd_setup_clocks(hba, false);
--
2.18.0.597.ga71716f1ad-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: Check workqueue exists before destroying it
2018-08-02 0:14 [PATCH] scsi: ufs: Check workqueue exists before destroying it Matthias Kaehlcke
@ 2018-08-07 17:09 ` Evan Green
2018-08-08 6:24 ` Stephen Boyd
1 sibling, 0 replies; 4+ messages in thread
From: Evan Green @ 2018-08-07 17:09 UTC (permalink / raw)
To: mka
Cc: Vinayak Holikatti, jejb, martin.petersen, subhashj, linux-scsi,
linux-kernel, Doug Anderson, sboyd
On Wed, Aug 1, 2018 at 5:14 PM Matthias Kaehlcke <mka@chromium.org> wrote:
>
> In ufshcd_hba_exit() the clock gating workqueue is always destroyed
> when clock gating is supported. However the workqueue pointer is NULL
> when ufshcd_init() fails before the workqueue is created. Only destroy
> the workqueue if it exists.
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
> drivers/scsi/ufs/ufshcd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 397081d320b1..401f7dbe2981 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -7190,7 +7190,8 @@ static void ufshcd_hba_exit(struct ufs_hba *hba)
> if (ufshcd_is_clkscaling_supported(hba)) {
> if (hba->devfreq)
> ufshcd_suspend_clkscaling(hba);
> - destroy_workqueue(hba->clk_scaling.workq);
> + if (hba->clk_scaling.workq)
> + destroy_workqueue(hba->clk_scaling.workq);
> ufshcd_devfreq_remove(hba);
> }
> ufshcd_setup_clocks(hba, false);
> --
> 2.18.0.597.ga71716f1ad-goog
>
Reviewed-by: Evan Green <evgreen@chromium.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: Check workqueue exists before destroying it
2018-08-02 0:14 [PATCH] scsi: ufs: Check workqueue exists before destroying it Matthias Kaehlcke
2018-08-07 17:09 ` Evan Green
@ 2018-08-08 6:24 ` Stephen Boyd
2018-08-09 18:57 ` Matthias Kaehlcke
1 sibling, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2018-08-08 6:24 UTC (permalink / raw)
To: James E . J . Bottomley, Martin K . Petersen, Matthias Kaehlcke,
Subhash Jadavani, Vinayak Holikatti
Cc: linux-scsi, linux-kernel, Evan Green, Douglas Anderson,
Matthias Kaehlcke
Quoting Matthias Kaehlcke (2018-08-01 17:14:35)
> In ufshcd_hba_exit() the clock gating workqueue is always destroyed
> when clock gating is supported. However the workqueue pointer is NULL
> when ufshcd_init() fails before the workqueue is created. Only destroy
> the workqueue if it exists.
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Any sort of Fixes: tag?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: Check workqueue exists before destroying it
2018-08-08 6:24 ` Stephen Boyd
@ 2018-08-09 18:57 ` Matthias Kaehlcke
0 siblings, 0 replies; 4+ messages in thread
From: Matthias Kaehlcke @ 2018-08-09 18:57 UTC (permalink / raw)
To: Stephen Boyd
Cc: James E . J . Bottomley, Martin K . Petersen, Subhash Jadavani,
Vinayak Holikatti, linux-scsi, linux-kernel, Evan Green,
Douglas Anderson
On Tue, Aug 07, 2018 at 11:24:50PM -0700, Stephen Boyd wrote:
> Quoting Matthias Kaehlcke (2018-08-01 17:14:35)
> > In ufshcd_hba_exit() the clock gating workqueue is always destroyed
> > when clock gating is supported. However the workqueue pointer is NULL
> > when ufshcd_init() fails before the workqueue is created. Only destroy
> > the workqueue if it exists.
> >
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
>
> Any sort of Fixes: tag?
I could add one, though it seems this patch is superseded by
https://patchwork.kernel.org/patch/10559013/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-09 18:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-02 0:14 [PATCH] scsi: ufs: Check workqueue exists before destroying it Matthias Kaehlcke
2018-08-07 17:09 ` Evan Green
2018-08-08 6:24 ` Stephen Boyd
2018-08-09 18:57 ` Matthias Kaehlcke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).