diff options
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r-- | drivers/base/platform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 445cbd8266ca..be6c1eb3cbe2 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -234,7 +234,7 @@ struct platform_object { | |||
234 | */ | 234 | */ |
235 | void platform_device_put(struct platform_device *pdev) | 235 | void platform_device_put(struct platform_device *pdev) |
236 | { | 236 | { |
237 | if (pdev) | 237 | if (!IS_ERR_OR_NULL(pdev)) |
238 | put_device(&pdev->dev); | 238 | put_device(&pdev->dev); |
239 | } | 239 | } |
240 | EXPORT_SYMBOL_GPL(platform_device_put); | 240 | EXPORT_SYMBOL_GPL(platform_device_put); |
@@ -447,7 +447,7 @@ void platform_device_del(struct platform_device *pdev) | |||
447 | { | 447 | { |
448 | int i; | 448 | int i; |
449 | 449 | ||
450 | if (pdev) { | 450 | if (!IS_ERR_OR_NULL(pdev)) { |
451 | device_del(&pdev->dev); | 451 | device_del(&pdev->dev); |
452 | 452 | ||
453 | if (pdev->id_auto) { | 453 | if (pdev->id_auto) { |