util: Add data ptr check to avoid crash

When the eth device is down, the data ptr is NULL,
so we should add a check to avoid crash.

Tested:
1. Let ncsi device down
`~# ip link set eth0 down`

2. Send a oem command to ncsi device, no crash.
```
ncsi-netlink -x 3 -p 0 -c 0 --oem-payload 00
Send OEM Command, CHANNEL : 0, PACKAGE : 0, IFINDEX: 3
Payload : 00
Response: No data
Failed to receive the message , RC : -1
```

Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
Change-Id: I1e1119f7891732a87b56a345dad8ec3549868bf7
1 file changed