MIPS: dma-default: Defend against NULL dev in massage_gfp_flags
authorMatt Redfearn <matt.redfearn@imgtec.com>
Mon, 21 Dec 2015 15:21:42 +0000 (15:21 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 9 May 2016 10:00:04 +0000 (12:00 +0200)
commit8d4925e9a5e5fb360b091b94a9682e02dfbf8e2b
tree77a653682e882660fb0085ffbe8f1e282760942e
parentfa0c879ffc869e2597364c72080fd4756a96e99a
MIPS: dma-default: Defend against NULL dev in massage_gfp_flags

This patch ensures that the dev parameter is checked for NULL before it
is dereferenced in massage_gfp_flags. If dev is NULL, then fall back
setting the GFP flag requested and available.

Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/11919/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/mm/dma-default.c