diff options
Diffstat (limited to 'drivers/ide/ide-proc.c')
-rw-r--r-- | drivers/ide/ide-proc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index f66c9c3f6fc6..0bdbb9bf90ba 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -561,11 +561,10 @@ static int proc_ide_read_dmodel | |||
561 | (char *page, char **start, off_t off, int count, int *eof, void *data) | 561 | (char *page, char **start, off_t off, int count, int *eof, void *data) |
562 | { | 562 | { |
563 | ide_drive_t *drive = (ide_drive_t *) data; | 563 | ide_drive_t *drive = (ide_drive_t *) data; |
564 | struct hd_driveid *id = drive->id; | 564 | char *m = (char *)&drive->id[ATA_ID_PROD]; |
565 | int len; | 565 | int len; |
566 | 566 | ||
567 | len = sprintf(page, "%.40s\n", | 567 | len = sprintf(page, "%.40s\n", m[0] ? m : "(none)"); |
568 | (id && id->model[0]) ? (char *)id->model : "(none)"); | ||
569 | PROC_IDE_READ_RETURN(page, start, off, count, eof, len); | 568 | PROC_IDE_READ_RETURN(page, start, off, count, eof, len); |
570 | } | 569 | } |
571 | 570 | ||