* [Patch] sis_main.c
@ 2001-05-04 14:58 Christopher Kanaan
2001-05-04 22:07 ` David Weinehall
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Kanaan @ 2001-05-04 14:58 UTC (permalink / raw)
To: kraxel, torvalds, linux-kernel
Hello,
I am a working with Dawson Englers meta compilation group at Stanford.
Here is a patch for sis_main.c Basically the patch checks to see
if kmalloc returns null. This patch applies to kernel version 2.4.4
Thanks,
Christopher Kanaan
--- /usr/src/linux/drivers/video/sis/sis_main.c Fri Feb 9 11:30:23 2001
+++ ./sis_main.c Fri May 4 07:34:47 2001
@@ -1030,6 +1030,11 @@
if (heap.pohFreeList == NULL) {
poha = kmalloc(OH_ALLOC_SIZE, GFP_KERNEL);
+ if(!poha)
+ {
+ return(NULL);
+ }
+
poha->pohaNext = heap.pohaChain;
heap.pohaChain = poha;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch] sis_main.c
@ 2001-05-04 15:21 Christopher Kanaan
0 siblings, 0 replies; 3+ messages in thread
From: Christopher Kanaan @ 2001-05-04 15:21 UTC (permalink / raw)
To: kraxel, torvalds, linux-kernel
Sorry
--- /usr/src/linux/drivers/video/sis/sis_main.c Fri Feb 9 11:30:23 2001
+++ ./sis_main.c Fri May 4 07:34:47 2001
@@ -1030,6 +1030,10 @@
if (heap.pohFreeList == NULL) {
poha = kmalloc(OH_ALLOC_SIZE, GFP_KERNEL);
+ if(!poha) {
+ return(NULL);
+ }
+
poha->pohaNext = heap.pohaChain;
heap.pohaChain = poha;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch] sis_main.c
2001-05-04 14:58 Christopher Kanaan
@ 2001-05-04 22:07 ` David Weinehall
0 siblings, 0 replies; 3+ messages in thread
From: David Weinehall @ 2001-05-04 22:07 UTC (permalink / raw)
To: Christopher Kanaan; +Cc: kraxel, torvalds, linux-kernel
On Fri, May 04, 2001 at 07:58:59AM -0700, Christopher Kanaan wrote:
> Hello,
> I am a working with Dawson Englers meta compilation group at Stanford.
> Here is a patch for sis_main.c Basically the patch checks to see
> if kmalloc returns null. This patch applies to kernel version 2.4.4
Great, but why not follow Documentation/CodingStyle, and the example set
by the rest of the file?!
Instead of:
> --- /usr/src/linux/drivers/video/sis/sis_main.c Fri Feb 9 11:30:23 2001
> +++ ./sis_main.c Fri May 4 07:34:47 2001
> @@ -1030,6 +1030,11 @@
> if (heap.pohFreeList == NULL) {
> poha = kmalloc(OH_ALLOC_SIZE, GFP_KERNEL);
>
> + if(!poha)
> + {
> + return(NULL);
> + }
> +
> poha->pohaNext = heap.pohaChain;
> heap.pohaChain = poha;
Something like this:
if (heap.pohFreeList == NULL) {
poha = kmalloc(OH_ALLOC_SIZE, GFP_KERNEL);
+ if (!poha) {
+ return(NULL);
+ }
+
poha->pohaNext = heap.pohaChain;
heap.pohaChain = poha;
/David Weinehall
_ _
// David Weinehall <tao@acc.umu.se> /> Northern lights wander \\
// Project MCA Linux hacker // Dance across the winter sky //
\> http://www.acc.umu.se/~tao/ </ Full colour fire </
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-05-04 22:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-04 15:21 [Patch] sis_main.c Christopher Kanaan
-- strict thread matches above, loose matches on Subject: below --
2001-05-04 14:58 Christopher Kanaan
2001-05-04 22:07 ` David Weinehall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox