From: Serge Ziryukin Date: Mon, 10 May 2010 14:40:49 +0000 (+0300) Subject: lan91c96, smc911x: remove useless free(ptr) calls on NULL ptr X-Git-Tag: v2010.06-rc1~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a599cde7698acc5ae3d0f731b4a7d63a931aae63;p=u-boot lan91c96, smc911x: remove useless free(ptr) calls on NULL ptr Signed-off-by: Serge Ziryukin --- diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c index 90e4002495..810079f032 100644 --- a/drivers/net/lan91c96.c +++ b/drivers/net/lan91c96.c @@ -795,7 +795,6 @@ int lan91c96_initialize(u8 dev_num, int base_addr) dev = malloc(sizeof(*dev)); if (!dev) { - free(dev); return 0; } memset(dev, 0, sizeof(*dev)); diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index f2fc88b71d..3da4c35fc2 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -242,7 +242,6 @@ int smc911x_initialize(u8 dev_num, int base_addr) dev = malloc(sizeof(*dev)); if (!dev) { - free(dev); return -1; } memset(dev, 0, sizeof(*dev));