kernel/natapci - Fix a NULL pointer dereference.
authorAntonio Huete Jimenez <tuxillo@quantumachine.net>
Fri, 28 Feb 2014 13:16:02 +0000 (14:16 +0100)
committerAntonio Huete Jimenez <tuxillo@quantumachine.net>
Fri, 28 Feb 2014 17:44:30 +0000 (18:44 +0100)
commit40fa28485e51267b667cffb3cc801ee93a20bc48
tree6916bdfe1d4db5b2d605ffffe3477a76bbcbccee
parent1a7bbca142a2a1d10c61db0e4b5d3230e8fc10a2
kernel/natapci - Fix a NULL pointer dereference.

- ata_devclass is NULL when no unit 0/1 is available or no
  legacy support has been detected.
- device_add_child() populates ata_devclass via make_device()
  so do not try to get information out of it when NULL.

Submitted-by: @dillon
sys/dev/disk/nata/ata-pci.c