Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751997AbaGGIYA (ORCPT ); Mon, 7 Jul 2014 04:24:00 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:64051 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbaGGIX5 (ORCPT ); Mon, 7 Jul 2014 04:23:57 -0400 X-Google-Original-Sender: Date: Mon, 7 Jul 2014 10:23:21 +0200 From: Johan Hovold To: Fabian Frederick Cc: linux-kernel@vger.kernel.org, Johan Hovold , Greg Kroah-Hartman , linux-usb@vger.kernel.org Subject: Re: [PATCH 1/1] drivers/usb/serial/mos7840.c: remove unnecessary null test before kfree Message-ID: <20140707082321.GA29098@localhost> References: <1403959449-5986-1-git-send-email-fabf@skynet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1403959449-5986-1-git-send-email-fabf@skynet.be> User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 28, 2014 at 02:44:09PM +0200, Fabian Frederick wrote: > Cc: Johan Hovold > Cc: Greg Kroah-Hartman > Cc: linux-usb@vger.kernel.org > Signed-off-by: Fabian Frederick Applied, thanks. Johan > --- > drivers/usb/serial/mos7840.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c > index 393be56..3d88eef 100644 > --- a/drivers/usb/serial/mos7840.c > +++ b/drivers/usb/serial/mos7840.c > @@ -1181,10 +1181,7 @@ static void mos7840_close(struct usb_serial_port *port) > /* Freeing Write URBs */ > for (j = 0; j < NUM_URBS; ++j) { > if (mos7840_port->write_urb_pool[j]) { > - if (mos7840_port->write_urb_pool[j]->transfer_buffer) > - kfree(mos7840_port->write_urb_pool[j]-> > - transfer_buffer); > - > + kfree(mos7840_port->write_urb_pool[j]->transfer_buffer); > usb_free_urb(mos7840_port->write_urb_pool[j]); > } > } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/