From: Bartlomiej Zolnierkiewicz Date: Fri, 1 Feb 2008 22:09:24 +0000 (+0100) Subject: ide-cd: coding style fixes for cdrom_get_toc_entry() X-Git-Tag: v2.6.25-rc1~1078^2~61 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c937ae4e7928f825dde2713e9ebba68d50ece6c;p=linux-2.6 ide-cd: coding style fixes for cdrom_get_toc_entry() This is a preparation to move code handling cdrom.c IOCTLs out of ide-cd.c. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index ee52c8a259..c92f0d4d45 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -2014,11 +2014,13 @@ static int cdrom_get_toc_entry(ide_drive_t *drive, int track, /* Check validity of requested track number. */ ntracks = toc->hdr.last_track - toc->hdr.first_track + 1; - if (toc->hdr.first_track == CDROM_LEADOUT) ntracks = 0; + + if (toc->hdr.first_track == CDROM_LEADOUT) + ntracks = 0; + if (track == CDROM_LEADOUT) *ent = &toc->ent[ntracks]; - else if (track < toc->hdr.first_track || - track > toc->hdr.last_track) + else if (track < toc->hdr.first_track || track > toc->hdr.last_track) return -EINVAL; else *ent = &toc->ent[track - toc->hdr.first_track];