[PATCH 4/5] scsi: sd: drop the dead -EOVERFLOW branches

From: shao.mingyin

Date: Thu Nov 05 2026 - 06:34:03 EST


From: Shao Mingyin <shao.mingyin@xxxxxxxxxx>

read_capacity_10() and read_capacity_16() no longer return -EOVERFLOW,
so the two branches that check for it are dead.

No functional change.

Signed-off-by: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
---
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index dc45df819c42..8474ad579e90 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2916,8 +2916,6 @@ sd_read_capacity(struct scsi_disk *sdkp, struct queue_limits *lim,

if (sd_try_rc16_first(sdp)) {
sector_size = read_capacity_16(sdkp, sdp, lim, buffer);
- if (sector_size == -EOVERFLOW)
- goto got_data;
if (sector_size == -ENODEV)
return;
if (sector_size < 0)
@@ -2926,8 +2924,6 @@ sd_read_capacity(struct scsi_disk *sdkp, struct queue_limits *lim,
return;
} else {
sector_size = read_capacity_10(sdkp, sdp, buffer);
- if (sector_size == -EOVERFLOW)
- goto got_data;
if (sector_size < 0)
return;
if ((sizeof(sdkp->capacity) > 4) &&