)]}'
{
  "commit": "fee0c54e28f6ca187add93dfca226a8093cfa931",
  "tree": "d62c8c58d90fda69cf035b36c457a8ce9df945ca",
  "parents": [
    "38dbfb59d1175ef458d006556061adeaa8751b72"
  ],
  "author": {
    "name": "Colin Cross",
    "email": "ccross@android.com",
    "time": "Fri Dec 20 16:43:50 2013 -0800"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@linuxfoundation.org",
    "time": "Fri Feb 07 14:21:09 2014 -0800"
  },
  "message": "dma-buf: avoid using IS_ERR_OR_NULL\n\ndma_buf_map_attachment and dma_buf_vmap can return NULL or\nERR_PTR on a error.  This encourages a common buggy pattern in\ncallers:\n\tsgt \u003d dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);\n\tif (IS_ERR_OR_NULL(sgt))\n                return PTR_ERR(sgt);\n\nThis causes the caller to return 0 on an error.  IS_ERR_OR_NULL\nis almost always a sign of poorly-defined error handling.\n\nThis patch converts dma_buf_map_attachment to always return\nERR_PTR, and fixes the callers that incorrectly handled NULL.\nThere are a few more callers that were not checking for NULL\nat all, which would have dereferenced a NULL pointer later.\nThere are also a few more callers that correctly handled NULL\nand ERR_PTR differently, I left those alone but they could also\nbe modified to delete the NULL check.\n\nThis patch also converts dma_buf_vmap to always return NULL.\nAll the callers to dma_buf_vmap only check for NULL, and would\nhave dereferenced an ERR_PTR and panic\u0027d if one was ever\nreturned. This is not consistent with the rest of the dma buf\nAPIs, but matches the expectations of all of the callers.\n\nSigned-off-by: Colin Cross \u003cccross@android.com\u003e\nReviewed-by: Rob Clark \u003crobdclark@gmail.com\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1e16cbd61da27877bf372cc90f1323d950676db2",
      "old_mode": 33188,
      "old_path": "drivers/base/dma-buf.c",
      "new_id": "cfe1d8bc7bb8b635b9ec18deea71f69583d3f439",
      "new_mode": 33188,
      "new_path": "drivers/base/dma-buf.c"
    },
    {
      "type": "modify",
      "old_id": "56805c39c906dfa64326dd8003e6445889f7840e",
      "old_mode": 33188,
      "old_path": "drivers/gpu/drm/drm_prime.c",
      "new_id": "bb516fdd195d463ca7627a2a1a69cb8d665a03fb",
      "new_mode": 33188,
      "new_path": "drivers/gpu/drm/drm_prime.c"
    },
    {
      "type": "modify",
      "old_id": "59827cc5e77090d7f1aa03e470a5c4cf40d4bb63",
      "old_mode": 33188,
      "old_path": "drivers/gpu/drm/exynos/exynos_drm_dmabuf.c",
      "new_id": "c786cd4f457bb8893fc4f02e8e27338832b1bc58",
      "new_mode": 33188,
      "new_path": "drivers/gpu/drm/exynos/exynos_drm_dmabuf.c"
    },
    {
      "type": "modify",
      "old_id": "33d3871d1e131dce9a2f1d8392020dce5b8ff799",
      "old_mode": 33188,
      "old_path": "drivers/media/v4l2-core/videobuf2-dma-contig.c",
      "new_id": "880be0782dd9d707db81d7f26068cf5700e6cba6",
      "new_mode": 33188,
      "new_path": "drivers/media/v4l2-core/videobuf2-dma-contig.c"
    }
  ]
}
