From: Ilia Mirkin Date: Sun, 13 Mar 2011 05:29:09 +0000 (-0500) Subject: staging: serqt_usb2: Remove NULL check before kfree X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef055f10000c5013d269cac9fc92c200bf314e40;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git staging: serqt_usb2: Remove NULL check before kfree This patch was generated by the following semantic patch: // @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // Signed-off-by: Ilia Mirkin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c index 27841ef6a568..2be2d889d443 100644 --- a/drivers/staging/serqt_usb2/serqt_usb2.c +++ b/drivers/staging/serqt_usb2/serqt_usb2.c @@ -1098,8 +1098,7 @@ static void qt_close(struct usb_serial_port *port) if (qt_port->write_urb) { /* if this urb had a transfer buffer already (old tx) free it */ - if (qt_port->write_urb->transfer_buffer != NULL) - kfree(qt_port->write_urb->transfer_buffer); + kfree(qt_port->write_urb->transfer_buffer); usb_free_urb(qt_port->write_urb); }