mirror of
https://gitee.com/openharmony/drivers_adapter_khdf_linux
synced 2024-11-30 08:10:53 +00:00
fix usb null pointer reference Signed-off-by: wu <wuzhimin8@huawei.com>
This commit is contained in:
parent
02b552199a
commit
2ed4f29f18
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user