Skip to content

Commit

Permalink
mtd: nand: ecc-bch: Return only valid error codes
Browse files Browse the repository at this point in the history
When a function is not available, returning -ENOTSUPP makes much more
sense than returning -1.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-6-miquel.raynal@bootlin.com
  • Loading branch information
Miquel Raynal committed Nov 30, 2020
1 parent 3c0fe36 commit e3010bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/mtd/nand-ecc-sw-bch.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static inline int
nand_bch_calculate_ecc(struct nand_chip *chip, const u_char *dat,
u_char *ecc_code)
{
return -1;
return -ENOTSUPP;
}

static inline int
Expand Down

0 comments on commit e3010bd

Please sign in to comment.