Showing error 1264

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/abituguru.c
Line in file: 1389
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

1359                                data->update_timeouts++;
1360                        if (data->update_timeouts <= ABIT_UGURU_MAX_TIMEOUTS) {
1361                                ABIT_UGURU_DEBUG(3, "timeout exceeded, will "
1362                                        "try again next update\n");
1363                                /* Just a timeout, fake a successful read */
1364                                success = 1;
1365                        } else
1366                                ABIT_UGURU_DEBUG(1, "timeout exceeded %d "
1367                                        "times waiting for more input state\n",
1368                                        (int)data->update_timeouts);
1369                }
1370                /* On success set last_updated */
1371                if (success)
1372                        data->last_updated = jiffies;
1373        }
1374        mutex_unlock(&data->update_lock);
1375
1376        if (success)
1377                return data;
1378        else
1379                return NULL;
1380}
1381
1382#ifdef CONFIG_PM
1383static int abituguru_suspend(struct platform_device *pdev, pm_message_t state)
1384{
1385        struct abituguru_data *data = platform_get_drvdata(pdev);
1386        /* make sure all communications with the uguru are done and no new
1387           ones are started */
1388        mutex_lock(&data->update_lock);
1389        return 0;
1390}
1391
1392static int abituguru_resume(struct platform_device *pdev)
1393{
1394        struct abituguru_data *data = platform_get_drvdata(pdev);
1395        /* See if the uGuru is still ready */
1396        if (inb_p(data->addr + ABIT_UGURU_DATA) != ABIT_UGURU_STATUS_INPUT)
1397                data->uguru_ready = 0;
1398        mutex_unlock(&data->update_lock);
1399        return 0;
Show full sources