9
0
Fork 0

nand bb: fix check when erasing a bb device

We can actually partly erase a bb device, so fix the check.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2009-09-10 12:05:11 +02:00
parent b23a83fcaf
commit 33a6b5abca
1 changed files with 2 additions and 2 deletions

View File

@ -150,8 +150,8 @@ static int nand_bb_erase(struct cdev *cdev, size_t count, unsigned long offset)
{
struct nand_bb *bb = cdev->priv;
if (offset != 0 || count != bb->raw_size) {
printf("can only erase whole device\n");
if (offset != 0) {
printf("can only erase from beginning of device\n");
return -EINVAL;
}