From: Michael Ellerman <mpe@ellerman.id.au>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
mikey@neuling.org, hbabu@us.ibm.com, linuxppc-dev@ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] powerpc/vas: Fix cleanup when VAS is not configured
Date: Mon, 12 Feb 2018 16:23:50 +1100 [thread overview]
Message-ID: <87d11awzkp.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <1518234567-24869-2-git-send-email-sukadev@linux.vnet.ibm.com>
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> writes:
> When VAS is not configured in the system, make sure to remove
> the VAS debugfs directory and unregister the platform driver.
>
> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
...
> diff --git a/arch/powerpc/platforms/powernv/vas.c b/arch/powerpc/platforms/powernv/vas.c
> index aebbe95..f83e27d8 100644
> --- a/arch/powerpc/platforms/powernv/vas.c
> +++ b/arch/powerpc/platforms/powernv/vas.c
> @@ -169,8 +169,11 @@ static int __init vas_init(void)
> found++;
> }
>
> - if (!found)
> + if (!found) {
> + platform_driver_unregister(&vas_driver);
> + vas_cleanup_dbgdir();
> return -ENODEV;
> + }
The better patch would be to move the call to vas_init_dbgdir() down
here, where we know we have successfully registered the driver.
cheers
next prev parent reply other threads:[~2018-02-12 5:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-10 3:49 [PATCH RESEND 1/4] powerpc/vas: Fix order of cleanup in debugfs dir Sukadev Bhattiprolu
2018-02-10 3:49 ` [PATCH 2/4] powerpc/vas: Fix cleanup when VAS is not configured Sukadev Bhattiprolu
2018-02-12 5:23 ` Michael Ellerman [this message]
2018-02-12 20:25 ` Sukadev Bhattiprolu
2018-02-13 3:17 ` Michael Ellerman
2018-02-10 3:49 ` [PATCH RESEND 3/4] powerpc/vas: Remove a stray line in Makefile Sukadev Bhattiprolu
2018-02-10 3:49 ` [PATCH 4/4] powerpc/vas: Add a couple of trace points Sukadev Bhattiprolu
2018-03-19 22:22 ` [4/4] " Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d11awzkp.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=benh@kernel.crashing.org \
--cc=hbabu@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikey@neuling.org \
--cc=sukadev@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.