summaryrefslogtreecommitdiffstats
path: root/cpukit/dev
diff options
context:
space:
mode:
authorBernd Moessner <berndmoessner80@gmail.com>2024-01-07 10:21:40 +0100
committerJoel Sherrill <joel@rtems.org>2024-01-16 10:57:43 -0600
commita73b52d6a469c330d21e02ea8f82a05edce9fb73 (patch)
treed7d4155692a0aae6a07ce0357cd9730ae457142a /cpukit/dev
parentflashdev: Add missing default case (diff)
downloadrtems-a73b52d6a469c330d21e02ea8f82a05edce9fb73.tar.bz2
flashdev.c: return error if both buffers are NULL
Updates #4981
Diffstat (limited to 'cpukit/dev')
-rw-r--r--cpukit/dev/flash/flashdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/dev/flash/flashdev.c b/cpukit/dev/flash/flashdev.c
index 8363ac96b1..f39f8dde4d 100644
--- a/cpukit/dev/flash/flashdev.c
+++ b/cpukit/dev/flash/flashdev.c
@@ -320,7 +320,7 @@ static int rtems_flashdev_read_write(
int status;
if ( read_buff == NULL && write_buff == NULL ) {
- return 0;
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/* Get flash address */