staging: vchiq: Fix refcounting bug in buffer_from_host()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 22 Jul 2020 13:06:51 +0000 (16:06 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Jul 2020 08:05:33 +0000 (10:05 +0200)
commit50b2677c4e276771a6383382929180b1589b835f
tree4c805cc87c250dd81b2bdce092840782140e89d3
parent908e757daecf2120c3019fa630ae5d4c3cd7165b
staging: vchiq: Fix refcounting bug in buffer_from_host()

If we fail to queue the buffer then it can never be dequeued.  This can
lead to a forever loop in stop_streaming() when we wait for everything
to finish.

Fixes: 70ec64ccdaac ("staging: bcm2835-camera: Ensure all buffers are returned on disable")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200722130651.GC220681@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c