Skip to content

Commit

Permalink
adfs: remove redundant test on unsigned
Browse files Browse the repository at this point in the history
unsigned block cannot be less than 0.

Signed-off-by: Roel Kluin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
RoelKluin authored and torvalds committed Sep 24, 2009
1 parent 458e5ff commit 3886de9
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions fs/adfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ static int
adfs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh,
int create)
{
if (block < 0)
goto abort_negative;

if (!create) {
if (block >= inode->i_blocks)
goto abort_toobig;
Expand All @@ -34,10 +31,6 @@ adfs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh,
/* don't support allocation of blocks yet */
return -EIO;

abort_negative:
adfs_error(inode->i_sb, "block %d < 0", block);
return -EIO;

abort_toobig:
return 0;
}
Expand Down

0 comments on commit 3886de9

Please sign in to comment.