Fixed coverity issue with resource leaks at variable "fw" going out of
scope leaks the storage it points to mt7921_check_offload_capability().
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 
1527806 ("Resource leaks")
Fixes: 034ae28b56f1 ("wifi: mt76: mt7921: introduce remain_on_channel support")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
        if (!fw || !fw->data || fw->size < sizeof(*hdr)) {
                dev_err(dev, "Invalid firmware\n");
-               return -EINVAL;
+               goto out;
        }
 
        data = fw->data;
                data += le16_to_cpu(rel_info->len) + rel_info->pad_len;
        }
 
+out:
        release_firmware(fw);
 
        return features ? features->data : 0;