Search Linux Wireless

RE: [PATCH] wifi: rtw88: usb: Support USB 3 with RTL8822CU/RTL8822BU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> wrote:
> On 08/07/2024 12:19, Ping-Ke Shih wrote:
> > Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> wrote:
> >> @@ -896,6 +972,14 @@ int rtw_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
> >>                 goto err_destroy_rxwq;
> >>         }
> >>
> >> +       ret = rtw_usb_switch_mode(rtwdev);
> >> +       if (ret) {
> >> +               /* Not a fail, but we do need to skip rtw_register_hw. */
> >> +               rtw_info(rtwdev, "switching to USB 3 mode\n");
> >
> > All logs in this patches should be rtw_dbg(), because these messages are not
> > important to users.
> >
> 
> Okay, I will add RTW_DBG_USB to enum rtw_debug_mask.
> 
> >
> >> +               ret = 0;

I missed this point "ret = 0" that rtw_usb_disconnect() will be called when
USB disconnect. Can't we just return an error code? any negative effect?

My point is to avoid calling rtw_usb_disconnect() for the case of switching
USB 3, because all stuffs have been freed by following error handles. 

> >> +               goto err_destroy_rxwq;
> >> +       }
> >> +
> >>         ret = rtw_register_hw(rtwdev, rtwdev->hw);
> >>         if (ret) {
> >>                 rtw_err(rtwdev, "failed to register hw\n");
> >> --
> >> 2.45.1
> >





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux