touchscreen: goodix_gt9xx: fix coverity warning

PD#172713: touchscreen: goodix_gt9xx: fix coverity warning

There is no judgment about whether the pointer
 is NULL before using it.
This causes "Dereference before null check".

Change-Id: Ic4d96cc1e48d16f409b71c70a049b433eeb39bf1
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
This commit is contained in:
Yingyuan Zhu
2018-08-29 19:52:14 +08:00
committed by Jianxin Pan
parent 9ed5567433
commit b18fccc8da

View File

@@ -1013,6 +1013,8 @@ static u8 gup_burn_proc(struct i2c_client *client, u8 *burn_buf, u16 start_addr,
u8 retry = 0;
GTP_DEBUG("Begin burn %dk data to addr 0x%x", (total_length/1024), start_addr);
if (!burn_buf)
return FAIL;
while(burn_length < total_length)
{
GTP_DEBUG("B/T:%04d/%04d", burn_length, total_length);