func: static void CVE_2014_3182_VULN_logi_dj_recv_add_djhid_device(struct dj_receiver_dev struct dj_report *dj_report) struct hid_device * djrcv_hdev = djrcv_dev -> hdev ; struct usb_interface * intf = to_usb_interface ( djrcv_hdev -> dev . parent ) ; struct usb_device * usbdev = interface_to_usbdev ( intf ) ; struct hid_device * dj_hiddev ; if ( dj_report -> report_params [ DEVICE_PAIRED_PARAM_SPFUNCTION ] & SPFUNCTION_DEVICE_LIST_EMPTY )  if ( ( dj_report -> device_index < DJ_DEVICE_INDEX_MIN ) || ( dj_report -> device_index > DJ_DEVICE_INDEX_MAX ) )  if ( djrcv_dev -> paired_dj_devices [ dj_report -> device_index ] )  dj_hiddev = hid_allocate_device ( ); if ( IS_ERR ( dj_hiddev ) )  dj_hiddev -> ll_driver = & logi_dj_ll_driver; dj_hiddev -> hid_output_raw_report = logi_dj_output_hidraw_report; dj_hiddev -> dev . parent = & djrcv_hdev -> dev; dj_hiddev -> bus = BUS_USB; dj_hiddev -> vendor = le16_to_cpu ( usbdev -> descriptor . idVendor ); dj_hiddev -> product = le16_to_cpu ( usbdev -> descriptor . idProduct ); snprintf ( dj_hiddev -> name , sizeof ( dj_hiddev -> name ) , "Logitech Unifying Device. Wireless PID:%02x%02x" , dj_report -> report_params [ DEVICE_PAIRED_PARAM_EQUAD_ID_MSB ] , dj_report -> report_params [ DEVICE_PAIRED_PARAM_EQUAD_ID_LSB ] ); usb_make_path ( usbdev , dj_hiddev -> phys , sizeof ( dj_hiddev -> phys ) ); strlcat ( dj_hiddev -> phys , tmpstr , sizeof ( dj_hiddev -> phys ) ); dj_dev -> hdev = dj_hiddev; dj_dev -> dj_receiver_dev = djrcv_dev; dj_dev -> device_index = dj_report -> device_index; dj_hiddev -> driver_data = dj_dev; djrcv_dev -> paired_dj_devices [ dj_report -> device_index ] = dj_dev; if ( hid_add_device ( dj_hiddev ) )  