]> git.sur5r.net Git - u-boot/commitdiff
lan91c96, smc911x: remove useless free(ptr) calls on NULL ptr
authorSerge Ziryukin <ftrvxmtrx@gmail.com>
Mon, 10 May 2010 14:40:49 +0000 (17:40 +0300)
committerWolfgang Denk <wd@denx.de>
Mon, 17 May 2010 21:21:08 +0000 (23:21 +0200)
Signed-off-by: Serge Ziryukin <ftrvxmtrx@gmail.com>
drivers/net/lan91c96.c
drivers/net/smc911x.c

index 90e4002495126e9fd5471073927720e2bb68a53d..810079f03267845d1de414baab625689dc8de7b9 100644 (file)
@@ -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));
index f2fc88b71d520abb0e91a53702e57d33b23a3a23..3da4c35fc29270ba6e784eb8404f47b736108b58 100644 (file)
@@ -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));