Showing error 1792

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/ide/ide-io.c
Line in file: 826
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

 796                 * We reset the drive so we need to issue a SETFEATURES.
 797                 * Do it _after_ do_special() restored device parameters.
 798                 */
 799                if (drive->current_speed == 0xff)
 800                        ide_config_drive_speed(drive, drive->desired_speed);
 801
 802                if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE)
 803                        return execute_drive_cmd(drive, rq);
 804                else if (blk_pm_request(rq)) {
 805                        struct request_pm_state *pm = rq->data;
 806#ifdef DEBUG_PM
 807                        printk("%s: start_power_step(step: %d)\n",
 808                                drive->name, pm->pm_step);
 809#endif
 810                        startstop = ide_start_power_step(drive, rq);
 811                        if (startstop == ide_stopped &&
 812                            pm->pm_step == IDE_PM_COMPLETED)
 813                                ide_complete_pm_request(drive, rq);
 814                        return startstop;
 815                } else if (!rq->rq_disk && blk_special_request(rq))
 816                        /*
 817                         * TODO: Once all ULDs have been modified to
 818                         * check for specific op codes rather than
 819                         * blindly accepting any special request, the
 820                         * check for ->rq_disk above may be replaced
 821                         * by a more suitable mechanism or even
 822                         * dropped entirely.
 823                         */
 824                        return ide_special_rq(drive, rq);
 825
 826                drv = *(ide_driver_t **)rq->rq_disk->private_data;
 827
 828                return drv->do_request(drive, rq, rq->sector);
 829        }
 830        return do_special(drive);
 831kill_rq:
 832        ide_kill_rq(drive, rq);
 833        return ide_stopped;
 834}
 835
 836/**
Show full sources