PD#172714: touchscreen: goodix_gt1x: fix coverity warning
There is no judgment about whether it is null before
using the pointer.
This causes "Untrusted value as argument".
Change-Id: I147b89e9a96cddf4bdc3c42753bd165b6b802065
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
u32 value = 0;
s32 ret = 0; //the initial value must be 0
u8 *data = NULL;
- int cnt = 30;
+ int cnt = 30;
/* Blocking when firmwaer updating */
while (cnt-- && update_info.status) {
} else {
value = (u32) arg;
}
+ if (!data)
+ return -1;
switch (cmd & NEGLECT_SIZE_MASK) {
case IO_GET_VERISON: