diff options
Diffstat (limited to 'drivers/net/tsec.c')
-rw-r--r-- | drivers/net/tsec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 071595218e..44140fb037 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -701,8 +701,10 @@ static int tsec_initialize(bd_t *bis, struct tsec_info_struct *tsec_info) priv = (struct tsec_private *)malloc(sizeof(*priv)); - if (!priv) + if (!priv) { + free(dev); return 0; + } priv->regs = tsec_info->regs; priv->phyregs_sgmii = tsec_info->miiregs_sgmii; |