IPMI: add 0.9 support
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / char / ipmi / ipmi_si_intf.c
index da09eb0..4f560d0 100644 (file)
@@ -2380,20 +2380,9 @@ static int try_get_dev_id(struct smi_info *smi_info)
        /* Otherwise, we got some data. */
        resp_len = smi_info->handlers->get_result(smi_info->si_sm,
                                                  resp, IPMI_MAX_MSG_LENGTH);
-       if (resp_len < 14) {
-               /* That's odd, it should be longer. */
-               rv = -EINVAL;
-               goto out;
-       }
-
-       if ((resp[1] != IPMI_GET_DEVICE_ID_CMD) || (resp[2] != 0)) {
-               /* That's odd, it shouldn't be able to fail. */
-               rv = -EINVAL;
-               goto out;
-       }
 
-       /* Record info from the get device id, in case we need it. */
-       ipmi_demangle_device_id(resp+3, resp_len-3, &smi_info->device_id);
+       /* Check and record info from the get device id, in case we need it. */
+       rv = ipmi_demangle_device_id(resp, resp_len, &smi_info->device_id);
 
  out:
        kfree(resp);