When installing the module, there could be a kernel oops due to a dereference of a NULL pointer. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@xxxxxxxxxx> --- drivers/staging/ipack/devices/ipoctal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/ipack/devices/ipoctal.c b/drivers/staging/ipack/devices/ipoctal.c index 7e370d3..df42b9b 100644 --- a/drivers/staging/ipack/devices/ipoctal.c +++ b/drivers/staging/ipack/devices/ipoctal.c @@ -799,6 +799,9 @@ static int ipoctal_match(struct ipack_device *dev) int res; unsigned char board_id; + if ((!dev->ops) || (!dev->ops->map_space) || (!dev->ops->unmap_space)) + return -ENODEV; + res = dev->ops->map_space(dev, 0, IPACK_ID_SPACE); if (res) return res; -- 1.7.10 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel