diff options
Diffstat (limited to 'arch/powerpc/sysdev/bestcomm/bestcomm.c')
-rw-r--r-- | arch/powerpc/sysdev/bestcomm/bestcomm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c index f589999361e0..64ec7d629363 100644 --- a/arch/powerpc/sysdev/bestcomm/bestcomm.c +++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c | |||
@@ -52,6 +52,10 @@ bcom_task_alloc(int bd_count, int bd_size, int priv_size) | |||
52 | int i, tasknum = -1; | 52 | int i, tasknum = -1; |
53 | struct bcom_task *tsk; | 53 | struct bcom_task *tsk; |
54 | 54 | ||
55 | /* Don't try to do anything if bestcomm init failed */ | ||
56 | if (!bcom_eng) | ||
57 | return NULL; | ||
58 | |||
55 | /* Get and reserve a task num */ | 59 | /* Get and reserve a task num */ |
56 | spin_lock(&bcom_eng->lock); | 60 | spin_lock(&bcom_eng->lock); |
57 | 61 | ||
@@ -484,8 +488,8 @@ mpc52xx_bcom_remove(struct of_device *op) | |||
484 | } | 488 | } |
485 | 489 | ||
486 | static struct of_device_id mpc52xx_bcom_of_match[] = { | 490 | static struct of_device_id mpc52xx_bcom_of_match[] = { |
487 | { .type = "dma-controller", .compatible = "fsl,mpc5200-bestcomm", }, | 491 | { .compatible = "fsl,mpc5200-bestcomm", }, |
488 | { .type = "dma-controller", .compatible = "mpc5200-bestcomm", }, | 492 | { .compatible = "mpc5200-bestcomm", }, |
489 | {}, | 493 | {}, |
490 | }; | 494 | }; |
491 | 495 | ||