ide-cd: coding style fixes for cdrom_get_toc_entry()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 1 Feb 2008 22:09:24 +0000 (23:09 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 1 Feb 2008 22:09:24 +0000 (23:09 +0100)
This is a preparation to move code handling cdrom.c IOCTLs out of ide-cd.c.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-cd.c

index ee52c8a259457374192f8beeb0245cd75d79a8ac..c92f0d4d4524070b2d361263267a7e67c9fa606f 100644 (file)
@@ -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];