Re: [PATCH] ASoC: cs35l35: Stash dev pointer directly rather than CODEC pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 3/17/17, 10:44 AM, "Charles Keepax" <ckeepax@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

    The driver stashes a CODEC pointer in the cs35l35_private structure,
    which is used to obtain a struct device pointer for error messages in the
    interrupt handler.
    
    However, doing so is not very safe as the interrupt is registered, as it
    should be in bus probe, but the CODEC pointer can't be safely stored until
    the ASoC level probe. This leaves a window between the two probes where if
    any interrupts are received a NULL pointer will be deferenced in the IRQ
    handler.
    
    Fix this issue by saving a pointer to the device directly and passing that
    to the error messages in the interrupt handler rather than using the CODEC
    pointer to access the device pointer.
    
    Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
    ---
Acked-by: Brian Austin <brian.austin@xxxxxxxxxx> 

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux