tty: hvc: replace BUG_ON() with negative return value
authorJuergen Gross <jgross@suse.com>
Mon, 29 Nov 2021 12:17:31 +0000 (13:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 07:45:05 +0000 (08:45 +0100)
commitc648eaa33928a65dd2ebf10948294929f0e7b95c
treeab7fee5fd318a8810af45b2501b284b16cc948d4
parentfbee0b5c20694402c6a4cb36a9ac480c3bf5c71d
tty: hvc: replace BUG_ON() with negative return value

commit e679004dec37566f658a255157d3aed9d762a2b7 upstream.

Xen frontends shouldn't BUG() in case of illegal data received from
their backends. So replace the BUG_ON()s when reading illegal data from
the ring page with negative return values.

Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20210707091045.460-1-jgross@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/hvc/hvc_xen.c