can: fix handling of unmodifiable configuration options fix
authorOliver Hartkopp <socketcan@hartkopp.net>
Tue, 21 Jun 2016 10:14:07 +0000 (12:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Aug 2016 09:49:29 +0000 (11:49 +0200)
commit864844524efebf19da164ed38f25aa3fb3a2d2de
treec30d9dc24e60e3acbaae28c9866187bfcc0b245b
parent1cee72ed4856504fd597145ce10b29751c4d27a1
can: fix handling of unmodifiable configuration options fix

commit bce271f255dae8335dc4d2ee2c4531e09cc67f5a upstream.

With upstream commit bb208f144cf3f59 (can: fix handling of unmodifiable
configuration options) a new can_validate() function was introduced.

When invoking 'ip link set can0 type can' without any configuration data
can_validate() tries to validate the content without taking into account that
there's totally no content. This patch adds a check for missing content.

Reported-by: ajneu <ajneu1@gmail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/dev.c