lkml.org 
[lkml]   [2005]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: [Linux-fbdev-devel] Re: 2.6.11-rc5, rivafb i2c oops, bogus error handling
    Date
    On Monday 28 February 2005 04:32, Olaf Hering wrote:
    > On Wed, Feb 23, Linus Torvalds wrote:
    > > This time it's really supposed to be a quickie, so people who can, please
    > > check it out, and we'll make the real 2.6.11 asap.
    >
    > Here is another one, probably not new.
    > Is riva_get_EDID_i2c a bit too optimistic by not having a $i2cadapter_ok
    > member in riva_par->riva_i2c_chan? It calls riva_probe_i2c_connector
    > even if riva_create_i2c_busses fails to register all 3 busses.
    >

    Thanks,

    Can you try this?

    Fixed error handling in rivafb-i2c.c if bus registration fails.

    Signed-off-by: Antonino Daplas <adaplas@pol.net>
    ---

    rivafb-i2c.c | 11 +++++++++--
    1 files changed, 9 insertions(+), 2 deletions(-)

    diff -Nru a/drivers/video/riva/rivafb-i2c.c b/drivers/video/riva/rivafb-i2c.c
    --- a/drivers/video/riva/rivafb-i2c.c 2005-01-13 03:57:12 +08:00
    +++ b/drivers/video/riva/rivafb-i2c.c 2005-02-28 08:22:06 +08:00
    @@ -120,8 +120,12 @@
    rc = i2c_bit_add_bus(&chan->adapter);
    if (rc == 0)
    dev_dbg(&chan->par->pdev->dev, "I2C bus %s registered.\n", name);
    - else
    - dev_warn(&chan->par->pdev->dev, "Failed to register I2C bus %s.\n", name);
    + else {
    + dev_warn(&chan->par->pdev->dev,
    + "Failed to register I2C bus %s.\n", name);
    + chan->par = NULL;
    + }
    +
    return rc;
    }

    @@ -171,6 +175,9 @@
    },
    };
    u8 *buf;
    +
    + if (!chan->par)
    + return NULL;

    buf = kmalloc(EDID_LENGTH, GFP_KERNEL);
    if (!buf) {

    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 14:10    [W:2.781 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site