OSDN Git Service

greybus: always drop reference in gb_operation_work()
authorAlex Elder <elder@linaro.org>
Mon, 1 Dec 2014 13:53:11 +0000 (07:53 -0600)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 2 Dec 2014 04:40:55 +0000 (20:40 -0800)
commite5fbc07360f1ed9da423abc2ab96a12f2d7a7632
tree9cab1d75daf0e7a2c010f28b642f7819e377a43b
parente413614b01763a84940168f253426fca89cdc38c
greybus: always drop reference in gb_operation_work()

Currently we issue a warning in gb_operation_work() if an operation
has no callback function defined.  But we return without dropping
the reference to the operation as we should.

Stop warning if there's no callback, call it only if it's defined,
and always drop the operation reference before returning.

This means we're now treating a NULL callback pointer as a normal
condition.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/operation.c