On Wed, Sep 11, 2019 at 11:46:36AM -0300, André Almeida wrote: > > -static int nr_devices = 1; > +static unsigned int nr_devices = 1; > module_param(nr_devices, int, 0444); ^^^ you forgot to change the module_param to match > + if (!nr_devices) { > + pr_err("null_blk: invalid number of devices\n"); > + return -EINVAL; > + } I don't think this is necessary.