From 0f9add440a4b0583bb7b26ca43c98b5c80202202 Mon Sep 17 00:00:00 2001 From: sungmin ha Date: Tue, 18 Dec 2012 10:20:12 +0900 Subject: [PATCH] [Title]modified for removing sonar violation [Desc.] [Issue]Numeric variables being used within a for loop for iteration counting shall not be modified in the body of the loop --- drivers/maru/maru_power_supply.c | 13 ++++++++----- package/pkginfo.manifest | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/maru/maru_power_supply.c b/drivers/maru/maru_power_supply.c index ab2495e5ac23..d6d5d6e62056 100644 --- a/drivers/maru/maru_power_supply.c +++ b/drivers/maru/maru_power_supply.c @@ -108,13 +108,16 @@ static int __init sysfs_test_init(void) for (i = 0; i < 3; i++) { err = device_create_file(mtd_device, &ps_device_attributes[i]); if (err) { - while (--i >= 0) { - device_remove_file(mtd_device, &ps_device_attributes[i]); - } - - device_unregister(mtd_device); break; } + } + + if (i != 3) { + while (--i >= 0) { + device_remove_file(mtd_device, &ps_device_attributes[i]); + } + + device_unregister(mtd_device); } return err; diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index 91fef186748a..d8f811aaa1b3 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,4 +1,4 @@ -Version: 1.4.10 +Version: 1.4.11 Maintainer: Yeong-Kyoon, Lee Source: emulator-kernel -- 2.34.1