diff --git a/model/input/driver/hdf_hid_adapter.c b/model/input/driver/hdf_hid_adapter.c index 1ab568243f094cd993b56a0bfe06fdfb05d1d81e..3ebda661b6c20d1a89d87547c1a337a9b908f1e9 100644 --- a/model/input/driver/hdf_hid_adapter.c +++ b/model/input/driver/hdf_hid_adapter.c @@ -114,12 +114,12 @@ static int32_t SetInputDevAbsAttr(InputDevice *inputDev, HidInfo *info) return HDF_SUCCESS; } -static int32_t GetInfoFromCache(InputDevice *inputDev, HidInfo *info) +static int32_t GetInfoFromCache(InputDevice *inputDev, HidInfo **info) { int32_t id = 0; while (id < MAX_INPUT_DEV_NUM) { if (g_cachedInfo[id] != NULL && !strcmp(inputDev->devName, g_cachedInfo[id]->devName)) { - info = g_cachedInfo[id]; + *info = g_cachedInfo[id]; break; } id++; @@ -137,7 +137,7 @@ static void SetInputDevAbility(InputDevice *inputDev) uint32_t len; int32_t ret; - ret = GetInfoFromCache(inputDev, info); + ret = GetInfoFromCache(inputDev, &info); MEMCPY_CHECK_RETURN(ret); len = sizeof(unsigned long); ret = memcpy_s(inputDev->abilitySet.devProp, len * BITS_TO_LONG(INPUT_PROP_CNT),