diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-03-10 18:45:48 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-06-07 14:27:49 -0600 |
commit | 6a5945a8eb5a626afe6feb341824e7e1d007c8ff (patch) | |
tree | dfcc13c09041a2784223fbceac4506d45036c99e /drivers/block | |
parent | 046636a4bac575aff78e44c7e1cff84c83a345a9 (diff) | |
download | linux-6a5945a8eb5a626afe6feb341824e7e1d007c8ff.tar.gz linux-6a5945a8eb5a626afe6feb341824e7e1d007c8ff.tar.bz2 linux-6a5945a8eb5a626afe6feb341824e7e1d007c8ff.zip |
pktcdvd: Get rid of redundant 'else'
In the snippets like the following
if (...)
return / goto / break / continue ...;
else
...
the 'else' is redundant. Get rid of it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20230310164549.22133-9-andriy.shevchenko@linux.intel.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/pktcdvd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index d352f7a369ef..4b675ec8bde5 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -941,25 +941,25 @@ static int pkt_set_segment_merging(struct pktcdvd_device *pd, struct request_que { struct device *ddev = disk_to_dev(pd->disk); - if ((pd->settings.size << 9) / CD_FRAMESIZE - <= queue_max_segments(q)) { + if ((pd->settings.size << 9) / CD_FRAMESIZE <= queue_max_segments(q)) { /* * The cdrom device can handle one segment/frame */ clear_bit(PACKET_MERGE_SEGS, &pd->flags); return 0; - } else if ((pd->settings.size << 9) / PAGE_SIZE - <= queue_max_segments(q)) { + } + + if ((pd->settings.size << 9) / PAGE_SIZE <= queue_max_segments(q)) { /* * We can handle this case at the expense of some extra memory * copies during write operations */ set_bit(PACKET_MERGE_SEGS, &pd->flags); return 0; - } else { - dev_err(ddev, "cdrom max_phys_segments too small\n"); - return -EIO; } + + dev_err(ddev, "cdrom max_phys_segments too small\n"); + return -EIO; } static void pkt_end_io_read(struct bio *bio) |