Showing error 605

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: drivers/mtd/chips/cfi_cmdset_0002.c
Line in file: 1595
Project: Linux Kernel
Project version: 2.6.28
Confirmation: Fixed by caf0e8e028516253afce6e40c52f0c193a221f8a
Tools: Stanse (1.2)
Entered: 2011-11-07 22:20:57 UTC


Source:

1565        /* Did we succeed? */
1566        if (!chip_good(map, adr, map_word_ff(map))) {
1567                /* reset on all failures. */
1568                map_write( map, CMD(0xF0), chip->start );
1569                /* FIXME - should have reset delay before continuing */
1570
1571                ret = -EIO;
1572        }
1573
1574        chip->state = FL_READY;
1575        xip_enable(map, chip, adr);
1576        put_chip(map, chip, adr);
1577        spin_unlock(chip->mutex);
1578
1579        return ret;
1580}
1581
1582
1583static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip, unsigned long adr, int len, void *thunk)
1584{
1585        struct cfi_private *cfi = map->fldrv_priv;
1586        unsigned long timeo = jiffies + HZ;
1587        DECLARE_WAITQUEUE(wait, current);
1588        int ret = 0;
1589
1590        adr += chip->start;
1591
1592        spin_lock(chip->mutex);
1593        ret = get_chip(map, chip, adr, FL_ERASING);
1594        if (ret) {
1595                spin_unlock(chip->mutex);
1596                return ret;
1597        }
1598
1599        DEBUG( MTD_DEBUG_LEVEL3, "MTD %s(): ERASE 0x%.8lx\n",
1600               __func__, adr );
1601
1602        XIP_INVAL_CACHED_RANGE(map, adr, len);
1603        ENABLE_VPP(map);
1604        xip_disable(map, chip, adr);
1605
Show full sources