[][openwrt][mt7988][tops][fix tops-tool code defects]

[Description]
Fix tops-tool code defects

According to the Coverity scan report to fix these code defects

[Release-log]
N/A

Change-Id: I40caa180ae9f76c3fc2a4776820d15f0ef89cf73
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8078056
1 file changed