diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index 6feb1a6b07d9ff0c7ad5ac4b2c2b7dc52ef04fd2..af16d0f3e2b302dbbd248eb974089b83a319155a 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -145,6 +145,7 @@ int bcm2835_audio_start(struct bcm2835_alsa_stream *alsa_stream) work->alsa_stream = alsa_stream; work->cmd = BCM2835_AUDIO_START; if (!queue_work(alsa_stream->my_wq, &work->my_work)) { + kfree(work); return -EBUSY; } } @@ -168,6 +169,7 @@ int bcm2835_audio_stop(struct bcm2835_alsa_stream *alsa_stream) work->alsa_stream = alsa_stream; work->cmd = BCM2835_AUDIO_STOP; if (!queue_work(alsa_stream->my_wq, &work->my_work)) { + kfree(work); return -EBUSY; } } @@ -194,6 +196,7 @@ int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream, work->src = src; work->count = count; if (!queue_work(alsa_stream->my_wq, &work->my_work)) { + kfree(work); return -EBUSY; } }