Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5153e97 authored by Harsh Kumar's avatar Harsh Kumar Committed by Greg Kroah-Hartman
Browse files

Staging: winbond: usb_free_urb(NULL) is safe



usb_free_urb(NULL) is safe. So, the check was removed. Also, couple of checkpatch.pl fixes

Signed-off-by: default avatarHarsh Kumar <harsh1kumar@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e8661ed
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ unsigned char Wb35Reg_BurstWrite(struct hw_data *pHwData, u16 RegisterNo, u32 *p

		return true;
	} else {
		if (urb)
		usb_free_urb(urb);
		kfree(reg_queue);
		return false;
@@ -206,7 +205,6 @@ unsigned char Wb35Reg_Write(struct hw_data *pHwData, u16 RegisterNo, u32 Registe

		return true;
	} else {
		if (urb)
		usb_free_urb(urb);
		kfree(reg_queue);
		return false;
@@ -270,7 +268,6 @@ unsigned char Wb35Reg_WriteWithCallbackValue(struct hw_data *pHwData,
		Wb35Reg_EP0VM_start(pHwData);
		return true;
	} else {
		if (urb)
		usb_free_urb(urb);
		kfree(reg_queue);
		return false;
@@ -374,7 +371,6 @@ unsigned char Wb35Reg_Read(struct hw_data *pHwData, u16 RegisterNo, u32 *pRegist

		return true;
	} else {
		if (urb)
		usb_free_urb(urb);
		kfree(reg_queue);
		return false;
+1 −2
Original line number Diff line number Diff line
@@ -343,7 +343,6 @@ void Wb35Rx_destroy(struct hw_data *pHwData)
	} while (pWb35Rx->EP3vm_state != VM_STOP);
	msleep(10); /* Delay for waiting function exit */

	if (pWb35Rx->RxUrb)
	usb_free_urb(pWb35Rx->RxUrb);
	pr_debug("Wb35Rx_destroy OK\n");
}
+1 −1

File changed.

Contains only whitespace changes.