diff options
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c index c888f9c809f9..a6620d2c9f50 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c @@ -319,7 +319,7 @@ static void __bo_take_off_handling(struct hmm_buffer_object *bo) * to take off this bo, we just set take the "prev/next" pointers * to NULL, the free rbtree stays unchaged */ - } else { + } else if (bo->prev != NULL && bo->next != NULL) { bo->next->prev = bo->prev; bo->prev->next = bo->next; bo->next = NULL; |