Re: [PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Wednesday, September 19, 2007 - 5:24 pm

On Tue, 18 Sep 2007 13:18:34 +0100 (BST)
"Maciej W. Rozycki" <macro@linux-mips.org> wrote:


This initialisation to zero is not good.

Because if some error-path code forgot to do `err = -EFOO' then probe()
will return zero and the driver will leave things in half-initialised state
and will then proceed as if things had succeeded.  It will crash.

So it's better to leave this local uninitialised, because we really want to
get that compiler warning if someone forgot to set the return value.

I made that change, but am too stupid to be able to work out how to create
a config which will let me compile this thing.

akpm:/usr/src/25> grep PMAG arch/arm/configs/*
akpm:/usr/src/25> 

bah.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics, Maciej W. Rozycki, (Mon Sep 17, 9:45 am)
Re: [PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics, Maciej W. Rozycki, (Tue Sep 18, 5:18 am)
Re: [PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics, Andrew Morton, (Wed Sep 19, 5:24 pm)
Re: [PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics, Martin Michlmayr, (Wed Sep 19, 11:16 pm)
Re: [PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics, Maciej W. Rozycki, (Thu Sep 20, 5:52 am)
Re: [PATCH] drivers/video/pmag-ba-fb.c: Improve diagnostics, Maciej W. Rozycki, (Thu Sep 20, 7:04 am)