[PATCH] Device class reference counting

From: Thomas Koeller (thomas.koeller_at_baslerweb.com)
Date: 07/30/04

  • Next message: Nicolas Boichat: "Re: Compile error in 2.6.8-rc2-mm1 - rivafb related"
    To: linux-kernel@vger.kernel.org
    Date:	Fri, 30 Jul 2004 18:03:00 +0200
    
    

    Hi,

    I found a little issue with reference counting for
    device classes in 2.6.8-rc2. Patch attached. Please
    cc me on any responses, as I am not subsribed to
    this list.

    tk

    --- linux-mips/drivers/base/class.c 2004-07-14 16:21:33.000000000 +0200
    +++ linux-mips-work/drivers/base/class.c 2004-07-30 17:51:09.477331128 +0200
    @@ -353,8 +353,8 @@
             struct class_interface * class_intf;
             int error;
     
    - class_dev = class_device_get(class_dev);
    - if (!class_dev || !strlen(class_dev->class_id))
    + if (!strlen(class_dev->class_id)
    + || !(class_dev = class_device_get(class_dev)))
                     return -EINVAL;
     
             parent = class_get(class_dev->class);

    -- 
    --------------------------------------------------
    Thomas Koeller, Software Development
    Basler Vision Technologies
    thomas dot koeller at baslerweb dot com
    http://www.baslerweb.com
    ==============================
    -
    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/
    

  • Next message: Nicolas Boichat: "Re: Compile error in 2.6.8-rc2-mm1 - rivafb related"