qemu_fw_cfg: don't leak kobj on init error
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 3 Apr 2016 12:22:08 +0000 (15:22 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 7 Apr 2016 12:16:39 +0000 (15:16 +0300)
commite8aabc64d7f5c8702e420c6fa478368f60718ae4
treeeae09e5ae7f60e8e2e375b6792639da64f71720f
parent9735a22799b9214d17d3c231fe377fc852f042e9
qemu_fw_cfg: don't leak kobj on init error

If platform_driver_register fails, we should
cleanup fw_cfg_top_ko before exiting.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Gabriel Somlo <somlo@cmu.edu>
drivers/firmware/qemu_fw_cfg.c