aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ata.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ata.h')
-rw-r--r--include/linux/ata.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 1ce19c1ef0e9..8a12d718c169 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -745,7 +745,7 @@ static inline int ata_ok(u8 status)
745static inline int lba_28_ok(u64 block, u32 n_block) 745static inline int lba_28_ok(u64 block, u32 n_block)
746{ 746{
747 /* check the ending block number */ 747 /* check the ending block number */
748 return ((block + n_block - 1) < ((u64)1 << 28)) && (n_block <= 256); 748 return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256);
749} 749}
750 750
751static inline int lba_48_ok(u64 block, u32 n_block) 751static inline int lba_48_ok(u64 block, u32 n_block)