Yang Yingliang 35bff23a05 hwmon: (ibmaem) don't call platform_device_del() if platform_device_add() fails
[ Upstream commit d0e51022a025ca5350fafb8e413a6fe5d4baf833 ]

If platform_device_add() fails, it no need to call platform_device_del(), split
platform_device_unregister() into platform_device_del/put(), so platform_device_put()
can be called separately.

Fixes: 8808a793f052 ("ibmaem: new driver for power/energy/temp meters in IBM System X hardware")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220701074153.4021556-1-yangyingliang@huawei.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-07-07 17:30:11 +02:00
..
2015-05-31 22:58:36 -07:00
2014-08-04 07:01:35 -07:00
2016-09-13 07:27:34 -07:00
2014-08-04 07:01:36 -07:00
2014-08-05 19:44:42 -07:00
2014-08-04 07:01:35 -07:00
2016-03-05 06:25:34 -08:00
2014-08-04 07:01:35 -07:00
2014-08-04 07:01:35 -07:00
2016-09-08 21:34:16 -07:00
2014-01-29 20:40:08 +01:00
2014-01-29 20:40:08 +01:00
2017-01-12 11:39:25 +01:00
2015-08-10 23:00:10 -07:00
2015-06-21 22:54:53 -07:00