Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9434d24b authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge branch 'v3.7-samsung-fixes-4' of...

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: default avatarArnd Bergmann <arnd@arndb.de>
parents 70e1584d 70b9b24d
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -473,13 +473,14 @@ 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);

		} else {
			chan->end->next = buf;
			chan->end = buf;
		}
	}

	/* if necessary, update the next buffer field */
	if (chan->next == NULL)