On Tue, 2017-12-12 at 09:57 +0100, Hannes Reinecke wrote: > sdev->sdev_gendev.parent = get_device(&starget->dev); > + if (!sdev->sdev_gendev.parent) { > + kfree(sdev); > + return NULL; > + } Are you sure that get_device() can return NULL? Thanks, Bart.