lkml.org 
[lkml]   [2014]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 1/2] staging: rtl8188eu: Deletion of unnecessary checks before three function calls
    On Wed, Nov 12, 2014 at 09:25:15PM +0100, SF Markus Elfring wrote:
    > @@ -487,8 +488,7 @@ static void rtw_usb_if1_deinit(struct adapter *if1)
    > DBG_88E("+r871xu_dev_remove, hw_init_completed=%d\n",
    > if1->hw_init_completed);
    > rtw_free_drv_sw(if1);
    > - if (pnetdev)
    > - rtw_free_netdev(pnetdev);
    > + rtw_free_netdev(pnetdev);

    I still feel that hiding the if statement inside the function call makes
    the code more subtle and it is a bad harmful thing to do. This is
    especially true if you have trained yourself to know that free_netdev()
    can't accept NULL pointers.

    regards,
    dan carpenter



    \
     
     \ /
      Last update: 2014-11-12 23:01    [W:4.217 / U:0.260 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site