From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753521AbbJBRak (ORCPT ); Fri, 2 Oct 2015 13:30:40 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:51539 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753317AbbJBRaj (ORCPT ); Fri, 2 Oct 2015 13:30:39 -0400 Date: Fri, 2 Oct 2015 12:30:34 -0500 From: Felipe Balbi To: Peter Senna Tschudin CC: , , , , , , , Subject: Re: [PATCH 04/14] RFC: usb/host/fotg210: Remove NULL checks dma_pool_destroy Message-ID: <20151002173034.GO5552@saruman.tx.rr.com> Reply-To: References: <20150915165002.GP19948@saruman.tx.rr.com> <1442847678-7970-1-git-send-email-peter.senna@gmail.com> <1442847678-7970-5-git-send-email-peter.senna@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O3WNCzIuUImKerqE" Content-Disposition: inline In-Reply-To: <1442847678-7970-5-git-send-email-peter.senna@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --O3WNCzIuUImKerqE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Peter Senna Tschudin looks good to me > --- > drivers/usb/host/fotg210-hcd.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) >=20 > diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hc= d.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_hc= d *fotg210) > fotg210->dummy =3D NULL; > =20 > /* DMA consistent memory and pools */ > - if (fotg210->qtd_pool) > - dma_pool_destroy(fotg210->qtd_pool); > + dma_pool_destroy(fotg210->qtd_pool); > fotg210->qtd_pool =3D NULL; > =20 > - if (fotg210->qh_pool) { > - dma_pool_destroy(fotg210->qh_pool); > - fotg210->qh_pool =3D NULL; > - } > + dma_pool_destroy(fotg210->qh_pool); > + fotg210->qh_pool =3D NULL; > =20 > - if (fotg210->itd_pool) > - dma_pool_destroy(fotg210->itd_pool); > + dma_pool_destroy(fotg210->itd_pool); > fotg210->itd_pool =3D NULL; > =20 > if (fotg210->periodic) > --=20 > 2.1.0 >=20 --=20 balbi --O3WNCzIuUImKerqE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWDr86AAoJEIaOsuA1yqREhkoP/j7KxOmRxefk+iNS/Q80QHXa PhAqZXYvYhROqUwMFgfrDQOwc0BjGGxEognZaQJP8+knJ793qB72/G3v00hfkQ4T gcAZY4uuYFQWzPYsiRy28LD4rxrR+6Fm+KL5fzfhxr3PGtj5n7qzdb8N4VkrKZuQ 0SB7yYsTs7alw/NA+HH68Z6wk82wWAmtkwFqb6TumnlcsPdlOD37fChCSLIRk7mT t7KPVP8DSqdF8JIiwe/Pk4lZvfscn2bJxppXv6Ic/OCXxN2gsCYBhux72kuQ4sNO OJHts7fCkx4hN7+D8mzGC8fdTS23mc8m4ZEjeTGcna7QSc/a2jXuR4P3IpSG+L7L NgLCh2RGaL3rc3VbaFp0zEVchsiK/rnb4Z5WdogwLM+SI6th922DWnz1mwRXrSsj FvZopS58znazko17ZSkcGTrCoth9d5daIZOkoz7p8ESyfNSAsygz/PYQBr3BPZOg PGkxmImiK1oAzdAMjLLKgSwlT434cf+IpffJcZuBnKDNXV1zti/uocwqIfx8ywM0 Ja640MUAjwR2h5h0P+W9JG+ysDu8wgEXxm9uwgtm1venF5D0sKGbPOwWfqwC3xn1 72PvPBpmfxVyDbcYamt/+V0MVA5gTuyseDese9+TKnC9xYALT8xMjBY8NCqFccge 9qde45/KP6gnwMzaygxc =sMid -----END PGP SIGNATURE----- --O3WNCzIuUImKerqE--