Skip to content

drivers: flash: flash_mcux_flexspi_nor incorrectly handles border case #87021

Closed
@Laczen

Description

@Laczen

Describe the bug

#84899 introduced input parameter checking for flash read operations.

The introduced check incorrectly handles the corner case where a read is performed of size 0 into a NULL array. The read fails with error code -EINVAL.

This introduces a difference between platforms when e.g. nvs_read is used to retrieve the size of an already stored element as reported in #86981.

To Reproduce

See #86981.

Expected behavior

No difference between platforms.

Logs and console output

See #86981.

Environment (please complete the following information):

See #86981.

Metadata

Metadata

Assignees

Labels

StalebugThe issue is a bug, or the PR is fixing a bugplatform: NXPNXPpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions