mirror of
https://github.com/openharmony/drivers_adapter_khdf_linux.git
synced 2026-07-20 00:54:12 -04:00
fixed 93a7cad from https://gitee.com/zhiminwu123/drivers_adapter_khdf_linux/pulls/280
fix usb null pointer reference Signed-off-by: wu <wuzhimin8@huawei.com>
This commit is contained in:
@@ -532,6 +532,11 @@ static int32_t GadgetPnpNotifyHdfSendEvent(const struct HdfDeviceObject *deviceO
|
||||
static int32_t UsbPnpNotifyFirstReport(struct usb_device *usbDev, void *data)
|
||||
{
|
||||
int32_t ret;
|
||||
if (data == NULL) {
|
||||
HDF_LOGE("%{pubilc}s:%{pubilc}d data is NULL", __func__, __LINE__);
|
||||
return HDF_FAILURE;
|
||||
}
|
||||
|
||||
struct HdfDeviceIoClient *client = (struct HdfDeviceIoClient *)data;
|
||||
|
||||
ret = UsbPnpNotifyHdfSendEvent(client->device, usbDev);
|
||||
|
||||
Reference in New Issue
Block a user