Showing error 953

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: net/dsa/mv88e6xxx.c
Line in file: 302
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:17 UTC


Source:

272        struct mv88e6xxx_priv_state *ps = (void *)_ps;
273
274        schedule_work(&ps->ppu_work);
275}
276
277static int mv88e6xxx_ppu_access_get(struct dsa_switch *ds)
278{
279        struct mv88e6xxx_priv_state *ps = (void *)(ds + 1);
280        int ret;
281
282        mutex_lock(&ps->ppu_mutex);
283
284        /*
285         * If the PHY polling unit is enabled, disable it so that
286         * we can access the PHY registers.  If it was already
287         * disabled, cancel the timer that is going to re-enable
288         * it.
289         */
290        if (!ps->ppu_disabled) {
291                ret = mv88e6xxx_ppu_disable(ds);
292                if (ret < 0) {
293                        mutex_unlock(&ps->ppu_mutex);
294                        return ret;
295                }
296                ps->ppu_disabled = 1;
297        } else {
298                del_timer(&ps->ppu_timer);
299                ret = 0;
300        }
301
302        return ret;
303}
304
305static void mv88e6xxx_ppu_access_put(struct dsa_switch *ds)
306{
307        struct mv88e6xxx_priv_state *ps = (void *)(ds + 1);
308
309        /*
310         * Schedule a timer to re-enable the PHY polling unit.
311         */
312        mod_timer(&ps->ppu_timer, jiffies + msecs_to_jiffies(10));
Show full sources