It fails for devfs block devices, which is what that code operates on.
Sure, but I specifically checked here that for, e. g., /dev/sda1 (brw-rw---- 1 root disk) open() just fails without read permissions for user on file with EACCESS, with or without O_RDONLY (which should be present always btw, 'man open' says "The argument flags must include one of the following access modes: O_RDONLY, O_WRONLY, or O_RDWR").