Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1238460 > unrolled thread
| Started by | Felipe Balbi <balbi@ti.com> |
|---|---|
| First post | 2015-10-02 19:40 +0200 |
| Last post | 2015-10-02 19:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 04/14] RFC: usb/host/fotg210: Remove NULL checks dma_pool_destroy Felipe Balbi <balbi@ti.com> - 2015-10-02 19:40 +0200
| From | Felipe Balbi <balbi@ti.com> |
|---|---|
| Date | 2015-10-02 19:40 +0200 |
| Subject | Re: [PATCH 04/14] RFC: usb/host/fotg210: Remove NULL checks dma_pool_destroy |
| Message-ID | <qfctl-1MB-37@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
On Mon, Sep 21, 2015 at 05:01:08PM +0200, Peter Senna Tschudin wrote:
> This patch remove NULL checks before calls to dma_pool_destroy() as the
> function now can handle NULL pointers.
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
looks good to me
> ---
> drivers/usb/host/fotg210-hcd.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
> index f574143..51feb61 100644
> --- a/drivers/usb/host/fotg210-hcd.c
> +++ b/drivers/usb/host/fotg210-hcd.c
> @@ -1925,17 +1925,13 @@ static void fotg210_mem_cleanup(struct fotg210_hcd *fotg210)
> fotg210->dummy = NULL;
>
> /* DMA consistent memory and pools */
> - if (fotg210->qtd_pool)
> - dma_pool_destroy(fotg210->qtd_pool);
> + dma_pool_destroy(fotg210->qtd_pool);
> fotg210->qtd_pool = NULL;
>
> - if (fotg210->qh_pool) {
> - dma_pool_destroy(fotg210->qh_pool);
> - fotg210->qh_pool = NULL;
> - }
> + dma_pool_destroy(fotg210->qh_pool);
> + fotg210->qh_pool = NULL;
>
> - if (fotg210->itd_pool)
> - dma_pool_destroy(fotg210->itd_pool);
> + dma_pool_destroy(fotg210->itd_pool);
> fotg210->itd_pool = NULL;
>
> if (fotg210->periodic)
> --
> 2.1.0
>
--
balbi
Back to top | Article view | linux.kernel
csiph-web