diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-08-06 16:31:26 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-03 13:13:01 +1000 |
commit | 43b1e9c9899ece92c1f68d45ae0d7b98d009f5d0 (patch) | |
tree | e3d2a36b555f1cc3893335df257eccb1bbce6f8f | |
parent | c4837d27945b9b607b5a7274a33059e73d1a7831 (diff) | |
download | op-kernel-dev-43b1e9c9899ece92c1f68d45ae0d7b98d009f5d0.zip op-kernel-dev-43b1e9c9899ece92c1f68d45ae0d7b98d009f5d0.tar.gz |
drm/nouveau/device: return proper error codes if ioremap fails
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/device/base.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/device/base.c b/drivers/gpu/drm/nouveau/core/subdev/device/base.c index 42faa65..cac67dc 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/device/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/device/base.c @@ -139,8 +139,8 @@ nouveau_devobj_ctor(struct nouveau_object *parent, if (!(args->disable & NV_DEVICE_DISABLE_IDENTIFY) && !device->card_type) { map = ioremap(mmio_base, 0x102000); - if (map == NULL) { - } + if (map == NULL) + return -ENOMEM; /* switch mmio to cpu's native endianness */ #ifndef __BIG_ENDIAN @@ -230,7 +230,7 @@ nouveau_devobj_ctor(struct nouveau_object *parent, nv_subdev(device)->mmio = ioremap(mmio_base, mmio_size); if (!nv_subdev(device)->mmio) { nv_error(device, "unable to map device registers\n"); - return ret; + return -ENOMEM; } } |