sdio: Do not allow setting a block size if function doesn't support it

This commit is contained in:
Emmanuel Vadot 2021-05-26 13:15:58 +02:00
parent 1ee7a80492
commit 49da0242e7

View File

@ -121,6 +121,9 @@ sdio_set_block_size(struct sdio_func *f, uint16_t bs)
uint32_t addr;
uint16_t v;
if (bs > f->max_blksize)
return (EOPNOTSUPP);
if (!sdio_get_support_multiblk(f->dev))
return (EOPNOTSUPP);