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 { */ void platform_device_put(struct platform_device *pdev) { - if (pdev) + if (!IS_ERR_OR_NULL(pdev)) put_device(&pdev->dev); } EXPORT_SYMBOL_GPL(platform_device_put); @@ -447,7 +447,7 @@ void platform_device_del(struct platform_device *pdev) { int i; - if (pdev) { + if (!IS_ERR_OR_NULL(pdev)) { device_del(&pdev->dev); if (pdev->id_auto) { |