Hi Dan

On 2015년 12월 22일 01:05, Dan Carpenter wrote:
Hello Glen Lee,

This is a semi-automatic email about new static checker warnings.

The patch ec62e6d1ec3f: "staging: wilc1000: wilc_send_config_pkt:
pass struct wilc" from Nov 18, 2015, leads to the following Smatch
complaint:

drivers/staging/wilc1000/host_interface.c:356 handle_set_wfi_drv_handler()
         warn: variable dereferenced before check 'hif_drv' (see line 353)

drivers/staging/wilc1000/host_interface.c
    352 
    353         result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
                                               ^^^^^^^^^^^^^
Patch adds a dereference.

    354                                       hif_drv_handler->handler);
    355 
    356         if (!hif_drv)
                      ^^^^^^^
Old check.

Recent patch 31f0f697dddd ("staging: wilc1000: wilc_set_wfi_drv_handler: pass vif 
index") will fix this issue
since we changed hif_drv with hif_drv_handler->handler to check deinit.

regards,
glen lee


    357                 up(&hif_sema_driver);
    358 

regards,
dan carpenter

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to