can: softing_cs: softingcs_probe(): fix memleak on registration failure

In case device registration fails during probe, the driver state and
the embedded platform device structure needs to be freed using
platform_device_put() to properly free all resources (e.g. the device

Fixes: 0a0b7a5f7a04 ("can: add driver for Softing card")
Cc: # 2.6.38
Signed-off-by: Johan Hovold <>
Reviewed-by: Greg Kroah-Hartman <>
Signed-off-by: Marc Kleine-Budde <>
1 file changed