Commit:     d007da1fa6f0ad5e01ceae4a1f60cdbb23ecd706
Parent:     c34b19fb4e243b26fa90a322bf32238356493674
Author:     Ivo van Doorn <[EMAIL PROTECTED]>
AuthorDate: Sat May 19 12:24:39 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Sat May 19 12:24:39 2007 -0700

    [RFKILL]: Fix check for correct rfkill allocation
    coverity has spotted a bug in rfkill.c (bug id #1627),
    in rfkill_allocate() NULL was returns if the kzalloc() works,
    and deref the NULL pointer if it fails,
    Signed-off-by: Ivo van Doorn <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/rfkill/rfkill.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
index a973603..f3986d4 100644
--- a/net/rfkill/rfkill.c
+++ b/net/rfkill/rfkill.c
@@ -296,7 +296,7 @@ struct rfkill *rfkill_allocate(struct device *parent, enum 
rfkill_type type)
        struct device *dev;
        rfkill = kzalloc(sizeof(struct rfkill), GFP_KERNEL);
-       if (rfkill)
+       if (!rfkill)
                return NULL;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to