bus: arm-ccn: Prevent hotplug callback leak
authorThomas Gleixner <tglx@linutronix.de>
Thu, 22 Dec 2016 10:14:06 +0000 (11:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 15 Jan 2017 12:42:57 +0000 (13:42 +0100)
commitaa1c7b01c9c7f263a0eb91a543fb91078ab5a508
tree0f4c820245fde199c8e7dfca5821b4a13a165cbd
parentbd99e7a6036e847476f130bfadc67d772debe636
bus: arm-ccn: Prevent hotplug callback leak

commit 26242b330093fd14c2e94fb6cbdf0f482ab26576 upstream.

In case the driver registration fails, the hotplug callback is leaked.

Not fatal, because it's never invoked as there are no instances registered,
but wrong nevertheless.

Fixes: fdc15a36d84e ("bus/arm-ccn: Convert to hotplug statemachine")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/arm-ccn.c