summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSerge Ziryukin <ftrvxmtrx@gmail.com>2010-05-10 17:40:49 +0300
committerWolfgang Denk <wd@denx.de>2010-05-17 23:21:08 +0200
commita599cde7698acc5ae3d0f731b4a7d63a931aae63 (patch)
tree73f3b3e40c66772817570ddc631b647c31a22588 /drivers
parent568278e336a1aad2019b0ee42837a72776d6cd49 (diff)
downloadu-boot-imx-a599cde7698acc5ae3d0f731b4a7d63a931aae63.zip
u-boot-imx-a599cde7698acc5ae3d0f731b4a7d63a931aae63.tar.gz
u-boot-imx-a599cde7698acc5ae3d0f731b4a7d63a931aae63.tar.bz2
lan91c96, smc911x: remove useless free(ptr) calls on NULL ptr
Signed-off-by: Serge Ziryukin <ftrvxmtrx@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/lan91c96.c1
-rw-r--r--drivers/net/smc911x.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c
index 90e4002..810079f 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 f2fc88b..3da4c35 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));