In case the buffer returned from the ISP was canceled, the upstream buffer was not correctly marked as canceled. Move the cancel functionality into an own helper function and correctly cancel the upstream buffers. Add missing cancellation in case queuing to the dewarper fails. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>