From a73b52d6a469c330d21e02ea8f82a05edce9fb73 Mon Sep 17 00:00:00 2001 From: Bernd Moessner Date: Sun, 7 Jan 2024 10:21:40 +0100 Subject: flashdev.c: return error if both buffers are NULL Updates #4981 --- cpukit/dev/flash/flashdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpukit/dev') 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 */ -- cgit v1.2.3