> On 18.11.2015, at 16.32, Maurizio Lombardi <mlombard@xxxxxxxxxx> wrote: > > If cdev_add() returns an error, the code calls > cdev_del() passing the STm->cdevs[rew] pointer as parameter; > the problem is that the pointer has not been initialized yet. > > This patch fixes the problem by moving the STm->cdevs[rew] pointer > initialization before the call to cdev_add(). > It also sets STm->devs[rew] and STm->cdevs[rew] to NULL in > case of failure. > > Signed-off-by: Maurizio Lombardi <mlombard@xxxxxxxxxx> Acked-by: Kai Mäkisara <kai.makisara@xxxxxxxxxxx> Thanks, Kai -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html