diff --git a/drivers/base/platform.c b/drivers/base/platform.c index ee99b15581290..60386a32208ff 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -543,7 +543,7 @@ int platform_device_add(struct platform_device *pdev) pdev->id = PLATFORM_DEVID_AUTO; } - while (--i >= 0) { + while (i--) { struct resource *r = &pdev->resource[i]; if (r->parent) release_resource(r);