linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: vpss: fix the order of resource clean up
@ 2019-03-26 12:17 Mukesh Ojha
  2019-04-01  7:25 ` Lad, Prabhakar
  0 siblings, 1 reply; 2+ messages in thread
From: Mukesh Ojha @ 2019-03-26 12:17 UTC (permalink / raw)
  To: prabhakar.csengg, mchehab, linux-media, linux-kernel; +Cc: Mukesh Ojha

Clean up of resources should be in reverse order of vpss_init().
Fix this inside vpss_exit().

Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
---
 drivers/media/platform/davinci/vpss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/davinci/vpss.c b/drivers/media/platform/davinci/vpss.c
index 19cf685..e380fd3 100644
--- a/drivers/media/platform/davinci/vpss.c
+++ b/drivers/media/platform/davinci/vpss.c
@@ -507,9 +507,9 @@ static int vpss_resume(struct device *dev)
 
 static void vpss_exit(void)
 {
+	platform_driver_unregister(&vpss_driver);
 	iounmap(oper_cfg.vpss_regs_base2);
 	release_mem_region(VPSS_CLK_CTRL, 4);
-	platform_driver_unregister(&vpss_driver);
 }
 
 static int __init vpss_init(void)
-- 
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center,
Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: vpss: fix the order of resource clean up
  2019-03-26 12:17 [PATCH] media: vpss: fix the order of resource clean up Mukesh Ojha
@ 2019-04-01  7:25 ` Lad, Prabhakar
  0 siblings, 0 replies; 2+ messages in thread
From: Lad, Prabhakar @ 2019-04-01  7:25 UTC (permalink / raw)
  To: Mukesh Ojha; +Cc: Mauro Carvalho Chehab, linux-media, LKML

On Tue, Mar 26, 2019 at 12:18 PM Mukesh Ojha <mojha@codeaurora.org> wrote:
>
> Clean up of resources should be in reverse order of vpss_init().
> Fix this inside vpss_exit().
>
> Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
> ---
>  drivers/media/platform/davinci/vpss.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
--Prabhakar Lad

> diff --git a/drivers/media/platform/davinci/vpss.c b/drivers/media/platform/davinci/vpss.c
> index 19cf685..e380fd3 100644
> --- a/drivers/media/platform/davinci/vpss.c
> +++ b/drivers/media/platform/davinci/vpss.c
> @@ -507,9 +507,9 @@ static int vpss_resume(struct device *dev)
>
>  static void vpss_exit(void)
>  {
> +       platform_driver_unregister(&vpss_driver);
>         iounmap(oper_cfg.vpss_regs_base2);
>         release_mem_region(VPSS_CLK_CTRL, 4);
> -       platform_driver_unregister(&vpss_driver);
>  }
>
>  static int __init vpss_init(void)
> --
> Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center,
> Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-01  7:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-26 12:17 [PATCH] media: vpss: fix the order of resource clean up Mukesh Ojha
2019-04-01  7:25 ` Lad, Prabhakar

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).