stmmac: handle allocation errors in setup functions