Commit 9c6195a
drivers: flash: sam: fix flash erase last page
The implementation for erasing pages in the flash_sam.c driver
indicated a successful erase after exceeding the last page to be
erased successfully. Since the last page has no proceeding page,
the succeeded status was not set.
This fix switches around the status to be set as succeeded before
erase begins, to have the succeeded status cleared if page unlock
or erase fails.
Signed-off-by: Bjarki Arge Andreasen <[email protected]>1 parent 70fc4a3 commit 9c6195a
1 file changed
+4
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
400 | 399 | | |
401 | 400 | | |
402 | 401 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
410 | 405 | | |
411 | 406 | | |
412 | 407 | | |
| |||
436 | 431 | | |
437 | 432 | | |
438 | 433 | | |
439 | | - | |
| 434 | + | |
440 | 435 | | |
441 | 436 | | |
442 | 437 | | |
| |||
0 commit comments