Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264114AbTEJNmq (ORCPT ); Sat, 10 May 2003 09:42:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264116AbTEJNmq (ORCPT ); Sat, 10 May 2003 09:42:46 -0400 Received: from locutus.cmf.nrl.navy.mil ([134.207.10.66]:40597 "EHLO locutus.cmf.nrl.navy.mil") by vger.kernel.org with ESMTP id S264114AbTEJNmp (ORCPT ); Sat, 10 May 2003 09:42:45 -0400 Message-Id: <200305101352.h4ADqoGi014392@locutus.cmf.nrl.navy.mil> To: Christoph Hellwig cc: Francois Romieu , "David S. Miller" , linux-kernel@vger.kernel.org Subject: Re: [ATM] [UPDATE] unbalanced exit path in Forerunner HE he_init_one() (and an iphase patch too!) In-reply-to: Your message of "Sat, 10 May 2003 06:20:16 BST." <20030510062015.A21408@infradead.org> X-url: http://www.nrl.navy.mil/CCS/people/chas/index.html X-mailer: nmh 1.0 Date: Sat, 10 May 2003 09:52:49 -0400 From: chas williams Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 875 Lines: 21 In message <20030510062015.A21408@infradead.org>,Christoph Hellwig writes: >> +init_one_failure: >> + if (atm_dev) atm_dev_deregister(atm_dev); >> + if (he_dev) kfree(he_dev); >> + pci_disable_device(pci_dev); >> + return err; > >kfree(NULL) if perfectly fine. Also please untangle all this if >statements to two separate lines. but its ok for usb drivers? class/usb-midi.c: if ( u ) kfree(u); class/usblp.c: if (usblp->statusbuf) kfree(usblp->statusbuf); class/usblp.c: if (usblp->device_id_string) kfree(usblp->device_id_string); image/mdc800.c:#define try_free_mem(A) if (A != 0) { kfree (A); A=0; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/