can: kvaser_usb: Fix potential uninitialized variable use
authorJimmy Assarsson <jimmyassarsson@gmail.com>
Mon, 6 Aug 2018 13:14:50 +0000 (15:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2018 15:13:09 +0000 (16:13 +0100)
commit2909e53a72ce7262a627658fdac65916e952ea73
tree198c8fbc23a24c65a4dec0e2fe89e19a8cdaee79
parent667bd202c5aa10d62afabd5b748bd6709227e88b
can: kvaser_usb: Fix potential uninitialized variable use

commit 95217260649aa504eb5d4a0d50959ca4e67c8f96 upstream.

If alloc_can_err_skb() fails, cf is never initialized.
Move assignment of cf inside check.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jimmy Assarsson <jimmyassarsson@gmail.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c