|
@@ -118,8 +118,10 @@ nouveau_bar_create_(struct nouveau_object *parent,
|
|
|
if (ret)
|
|
|
return ret;
|
|
|
|
|
|
- bar->iomem = ioremap(nv_device_resource_start(device, 3),
|
|
|
- nv_device_resource_len(device, 3));
|
|
|
+ if (nv_device_resource_len(device, 3) != 0)
|
|
|
+ bar->iomem = ioremap(nv_device_resource_start(device, 3),
|
|
|
+ nv_device_resource_len(device, 3));
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|