On Tue, Jun 15, 2021 at 02:21:18PM -0700, Kees Cook wrote: > - if (!dev || !dev->total_size || !dev->read || !dev->write) > + if (!dev || !dev->total_size || !dev->read || !dev->write) { > + if (!dev) > + pr_err("NULL device info\n"); > + else { > + if (!dev->total_size) > + pr_err("zero sized device\n"); > + if (!dev->read) > + pr_err("no read handler for device\n"); > + if (!dev->write) > + pr_err("no write handler for device\n"); > + } > return -EINVAL; > + } I still find this style of checks pretty strange..