Showing error 528

User: Jiri Slaby
Error type: Calling function from invalid context
Error type description: Some function is called at inappropriate place like sleep inside critical sections or interrupt handlers
File location: drivers/pcmcia/ds.c
Line in file: 569
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:19:02 UTC


Source:

 539 */
 540static int pcmcia_device_query(struct pcmcia_device *p_dev)
 541{
 542        cistpl_manfid_t manf_id;
 543        cistpl_funcid_t func_id;
 544        cistpl_vers_1_t        *vers1;
 545        unsigned int i;
 546
 547        vers1 = kmalloc(sizeof(*vers1), GFP_KERNEL);
 548        if (!vers1)
 549                return -ENOMEM;
 550
 551        if (!pccard_read_tuple(p_dev->socket, p_dev->func,
 552                               CISTPL_MANFID, &manf_id)) {
 553                p_dev->manf_id = manf_id.manf;
 554                p_dev->card_id = manf_id.card;
 555                p_dev->has_manf_id = 1;
 556                p_dev->has_card_id = 1;
 557        }
 558
 559        if (!pccard_read_tuple(p_dev->socket, p_dev->func,
 560                               CISTPL_FUNCID, &func_id)) {
 561                p_dev->func_id = func_id.func;
 562                p_dev->has_func_id = 1;
 563        } else {
 564                /* rule of thumb: cards with no FUNCID, but with
 565                 * common memory device geometry information, are
 566                 * probably memory cards (from pcmcia-cs) */
 567                cistpl_device_geo_t *devgeo;
 568
 569                devgeo = kmalloc(sizeof(*devgeo), GFP_KERNEL);
 570                if (!devgeo) {
 571                        kfree(vers1);
 572                        return -ENOMEM;
 573                }
 574                if (!pccard_read_tuple(p_dev->socket, p_dev->func,
 575                                      CISTPL_DEVICE_GEO, devgeo)) {
 576                        ds_dev_dbg(0, &p_dev->dev,
 577                                   "mem device geometry probably means "
 578                                   "FUNCID_MEMORY\n");
 579                        p_dev->func_id = CISTPL_FUNCID_MEMORY;
Show full sources