This patch de-allocates work when queue_work(..) fails in the
bcm2835-audio work functions
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
work->alsa_stream = alsa_stream;
work->cmd = BCM2835_AUDIO_START;
if (!queue_work(alsa_stream->my_wq, &work->my_work)) {
+ kfree(work);
return -EBUSY;
}
}
work->alsa_stream = alsa_stream;
work->cmd = BCM2835_AUDIO_STOP;
if (!queue_work(alsa_stream->my_wq, &work->my_work)) {
+ kfree(work);
return -EBUSY;
}
}
work->src = src;
work->count = count;
if (!queue_work(alsa_stream->my_wq, &work->my_work)) {
+ kfree(work);
return -EBUSY;
}
}