diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-11-29 18:07:27 +0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-11-29 18:07:27 +0400 |
commit | 9434d24b11ccceeb39522965593ef2ddc9eb4e7c (patch) | |
tree | d33f3af33fc877de4e5502a0257cef16a819fbf0 /arch | |
parent | 70e1584d47c3c25cb5c059802b86da280c4facf1 (diff) | |
parent | 70b9b24d4d240ff5f6087bca4013c6969af275ab (diff) | |
download | linux-9434d24b11ccceeb39522965593ef2ddc9eb4e7c.tar.xz |
Merge branch 'v3.7-samsung-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes
From Kukjin Kim <kgene.kim@samsung.com>:
Samsung fixes for v3.7
* 'v3.7-samsung-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: S3C24XX: Fix potential NULL pointer dereference error
This would have been ok to delay to 3.8 according to Kukjin, but since
it's an obvious bug fix and a potential NULL pointer dereference, it
seem appropriate for a late 3.7 submission.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-s3c24xx/dma.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index db98e7021f0d..0abd1c469887 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c @@ -473,12 +473,13 @@ int s3c2410_dma_enqueue(enum dma_ch channel, void *id, pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n", chan->number, __func__, buf); - if (chan->end == NULL) + if (chan->end == NULL) { pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n", chan->number, __func__, chan); - - chan->end->next = buf; - chan->end = buf; + } else { + chan->end->next = buf; + chan->end = buf; + } } /* if necessary, update the next buffer field */ |