Re: [PATCH v6 19/19] staging: r8188eu: remove shared buffer for USB requests

From: Pavel Skripkin
Date: Thu Sep 16 2021 - 07:51:22 EST


On 9/16/21 14:49, Dan Carpenter wrote:
On Wed, Sep 15, 2021 at 11:11:03PM +0200, Fabio M. De Francesco wrote:
static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
{
int i;
@@ -158,9 +135,6 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
DBG_88E("NON USB_SPEED_HIGH\n");
}
- if (rtw_init_intf_priv(pdvobjpriv) == _FAIL)
- goto free_dvobj;
-
/* 3 misc */
sema_init(&pdvobjpriv->usb_suspend_sema, 0);
rtw_reset_continual_urb_error(pdvobjpriv);
@@ -169,7 +143,6 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
status = _SUCCESS;
^^^^^^^^^^^^^^^^^

-free_dvobj:
if (status != _SUCCESS && pdvobjpriv) {
^^^^^^^^^^^^^^^^^^
status is going to be _SUCCESS so we can delete this if statement.


silly mistake :(

will be fixed in v7, thanks so much for review


usb_set_intfdata(usb_intf, NULL);
kfree(pdvobjpriv);
@@ -200,7 +173,7 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf)
usb_reset_device(interface_to_usbdev(usb_intf));
}
}
- rtw_deinit_intf_priv(dvobj);
+
kfree(dvobj);
}




With regards,
Pavel Skripkin