IB/hfi1: Check device id early during init
authorTadeusz Struk <tadeusz.struk@intel.com>
Tue, 21 Mar 2017 00:25:29 +0000 (17:25 -0700)
committerDoug Ledford <dledford@redhat.com>
Wed, 5 Apr 2017 18:45:09 +0000 (14:45 -0400)
commit5d6f08afdd394c0b162cefe383093aace3e94e39
tree220243f80b329c9a83b7f57b87da2560b64805e8
parent9260b3541f3a9159b6f49270077d8669870d5db0
IB/hfi1: Check device id early during init

If there is a wrong device passed to the driver it should fail early,
without trying to initialize the device only to find out that it has
an invalid device later during the init.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/init.c