71c71
< __FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_ch.c 287806 2015-09-15 05:09:17Z markj $");
---
> __FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_ch.c 293350 2016-01-07 20:22:55Z kib $");
374a375,376
> struct make_dev_args args;
> int error;
434,436c436,444
< softc->dev = make_dev(&ch_cdevsw, periph->unit_number, UID_ROOT,
< GID_OPERATOR, 0600, "%s%d", periph->periph_name,
< periph->unit_number);
---
> make_dev_args_init(&args);
> args.mda_devsw = &ch_cdevsw;
> args.mda_unit = periph->unit_number;
> args.mda_uid = UID_ROOT;
> args.mda_gid = GID_OPERATOR;
> args.mda_mode = 0600;
> args.mda_si_drv1 = periph;
> error = make_dev_s(&args, &softc->dev, "%s%d", periph->periph_name,
> periph->unit_number);
438c446,449
< softc->dev->si_drv1 = periph;
---
> if (error != 0) {
> cam_periph_release_locked(periph);
> return (CAM_REQ_CMP_ERR);
> }
510,511d520
< if (periph == NULL)
< return(ENXIO);
757,759d765
< if (periph == NULL)
< return(ENXIO);
<
< __FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_ch.c 287806 2015-09-15 05:09:17Z markj $");
---
> __FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_ch.c 293350 2016-01-07 20:22:55Z kib $");
374a375,376
> struct make_dev_args args;
> int error;
434,436c436,444
< softc->dev = make_dev(&ch_cdevsw, periph->unit_number, UID_ROOT,
< GID_OPERATOR, 0600, "%s%d", periph->periph_name,
< periph->unit_number);
---
> make_dev_args_init(&args);
> args.mda_devsw = &ch_cdevsw;
> args.mda_unit = periph->unit_number;
> args.mda_uid = UID_ROOT;
> args.mda_gid = GID_OPERATOR;
> args.mda_mode = 0600;
> args.mda_si_drv1 = periph;
> error = make_dev_s(&args, &softc->dev, "%s%d", periph->periph_name,
> periph->unit_number);
438c446,449
< softc->dev->si_drv1 = periph;
---
> if (error != 0) {
> cam_periph_release_locked(periph);
> return (CAM_REQ_CMP_ERR);
> }
510,511d520
< if (periph == NULL)
< return(ENXIO);
757,759d765
< if (periph == NULL)
< return(ENXIO);
<