Showing error 1265

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: drivers/hwmon/abituguru3.c
Line in file: 1100
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

1070                for (i = 0; i < 16; i++) {
1071                        if (abituguru3_read(data, ABIT_UGURU3_SENSORS_BANK,
1072                                        ABIT_UGURU3_VALUES_START + 32 + i,
1073                                        1, &data->value[32 + i]) != 1)
1074                                goto LEAVE_UPDATE;
1075                        if (abituguru3_read_increment_offset(data,
1076                                        ABIT_UGURU3_SETTINGS_BANK,
1077                                        ABIT_UGURU3_SETTINGS_START + 32 * 3 +
1078                                                i * 2, 1,
1079                                        data->settings[32 + i], 2) != 2)
1080                                goto LEAVE_UPDATE;
1081                }
1082                data->last_updated = jiffies;
1083                data->valid = 1;
1084        }
1085LEAVE_UPDATE:
1086        mutex_unlock(&data->update_lock);
1087        if (data->valid)
1088                return data;
1089        else
1090                return NULL;
1091}
1092
1093#ifdef CONFIG_PM
1094static int abituguru3_suspend(struct platform_device *pdev, pm_message_t state)
1095{
1096        struct abituguru3_data *data = platform_get_drvdata(pdev);
1097        /* make sure all communications with the uguru3 are done and no new
1098           ones are started */
1099        mutex_lock(&data->update_lock);
1100        return 0;
1101}
1102
1103static int abituguru3_resume(struct platform_device *pdev)
1104{
1105        struct abituguru3_data *data = platform_get_drvdata(pdev);
1106        mutex_unlock(&data->update_lock);
1107        return 0;
1108}
1109#else
1110#define abituguru3_suspend        NULL
Show full sources