From: Rasmus Andersen <rasmus@jaquet.dk>
To: werner@titro.de
Cc: isdn4linux@listserv.isdn4linux.de, linux-kernel@vger.kernel.org
Subject: [PATCH] make kmalloc error return unconditional in hysdn_net.c (245ac1)
Date: Mon, 28 May 2001 22:53:05 +0200 [thread overview]
Message-ID: <20010528225305.M846@jaquet.dk> (raw)
Hi.
The patch below fixes what I believe is a bug in hysdn_net.c.
I cannot see how we can proceed under _any_ circumstances
after the kmalloc fails. Applies against 245ac1.
--- linux-245-ac1-clean/drivers/isdn/hysdn/hysdn_net.c Sun May 27 22:15:22 2001
+++ linux-245-ac1/drivers/isdn/hysdn/hysdn_net.c Mon May 28 22:44:16 2001
@@ -304,8 +304,7 @@
hysdn_net_release(card); /* release an existing net device */
if ((dev = kmalloc(sizeof(struct net_local), GFP_KERNEL)) == NULL) {
printk(KERN_WARNING "HYSDN: unable to allocate mem\n");
- if (card->debug_flags & LOG_NET_INIT)
- return (-ENOMEM);
+ return (-ENOMEM);
}
memset(dev, 0, sizeof(struct net_local)); /* clean the structure */
--
Regards,
Rasmus(rasmus@jaquet.dk)
It has just been discovered that research causes cancer in rats.
next reply other threads:[~2001-05-28 20:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-28 20:53 Rasmus Andersen [this message]
2001-05-29 8:40 ` [PATCH] make kmalloc error return unconditional in hysdn_net.c (245ac1) Kai Germaschewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010528225305.M846@jaquet.dk \
--to=rasmus@jaquet.dk \
--cc=isdn4linux@listserv.isdn4linux.de \
--cc=linux-kernel@vger.kernel.org \
--cc=werner@titro.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox