drm/amdkfd: Fix a && vs || typo
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 7 Oct 2019 08:52:10 +0000 (11:52 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Oct 2019 20:11:02 +0000 (15:11 -0500)
In the current code if "device_info" is ever NULL then the kernel will
Oops so probably || was intended instead of &&.

Fixes: e392c887df97 ("drm/amdkfd: Use array to probe kfd2kgd_calls")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device.c

index 0db2735..070c9b5 100644 (file)
@@ -498,7 +498,7 @@ struct kfd_dev *kgd2kfd_probe(struct kgd_dev *kgd,
        device_info = kfd_supported_devices[asic_type][vf];
        f2g = kfd2kgd_funcs[asic_type];
 
-       if (!device_info && !f2g) {
+       if (!device_info || !f2g) {
                dev_err(kfd_device, "%s %s not supported in kfd\n",
                        amdgpu_asic_name[asic_type], vf ? "VF" : "");
                return NULL;