]> git.karo-electronics.de Git - linux-beck.git/commit
staging: greybus: light: check delay_{on|off} before use
authorRui Miguel Silva <rmfrfs@gmail.com>
Fri, 30 Sep 2016 18:24:33 +0000 (19:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 2 Oct 2016 13:49:26 +0000 (15:49 +0200)
commitdc875c77900dba5d177f9219492fd60c046feec8
tree0a4e1543bbd3facabbdf49b7e57d9f0624a33aab
parent3855eeec1a47cace93acd5ff89fb3c9bd593d307
staging: greybus: light: check delay_{on|off} before use

Even though we trust leds core that the pointers should be valid, we are
safer to check delay_{on|off} before use.

Also, this avoid a smatch warning:
drivers/staging/greybus/light.c:484 gb_blink_set()
warn: variable dereferenced before check 'delay_on' (see line 476)

Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/greybus/light.c