• Andrea Righi's avatar
    [netdrvr] depca: handle platform_device_add() failure · d91c088b
    Andrea Righi authored
    The following patch fixes a kernel bug in depca_platform_probe().
    
    We don't use a dynamic pointer for pldev->dev.platform_data, so it seems
    that the correct way to proceed if platform_device_add(pldev) fails is
    to explicitly set the pldev->dev.platform_data pointer to NULL, before
    calling the platform_device_put(pldev), or it will be kfree'ed by
    platform_device_release().
    Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
    d91c088b
depca.c 60.5 KB