summaryrefslogtreecommitdiffstats
path: root/drivers/dma/pl330.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-09-25 09:24:59 +0200
committerIngo Molnar <mingo@kernel.org>2012-09-25 09:26:55 +0200
commit9b20aa63b8fc9a6a3b6831f4eae3621755e51211 (patch)
tree0c379f3f3d84411246b49e1c8557480bb0f1d0b0 /drivers/dma/pl330.c
parent7ece55a4a3a04abe37118b1d4fb0b702eeb1de4c (diff)
parent979570e02981d4a8fc20b3cc8fd651856c98ee9d (diff)
downloadlinux-9b20aa63b8fc9a6a3b6831f4eae3621755e51211.tar.bz2
Merge tag 'v3.6-rc7' into core/rcu
Merge Linux 3.6-rc7, to pick up fixes and to resolve a conflict in an upcoming pull. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r--drivers/dma/pl330.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index e4feba6b03c0..f5843bc80baa 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -1567,17 +1567,19 @@ static int pl330_submit_req(void *ch_id, struct pl330_req *r)
goto xfer_exit;
}
- /* Prefer Secure Channel */
- if (!_manager_ns(thrd))
- r->cfg->nonsecure = 0;
- else
- r->cfg->nonsecure = 1;
/* Use last settings, if not provided */
- if (r->cfg)
+ if (r->cfg) {
+ /* Prefer Secure Channel */
+ if (!_manager_ns(thrd))
+ r->cfg->nonsecure = 0;
+ else
+ r->cfg->nonsecure = 1;
+
ccr = _prepare_ccr(r->cfg);
- else
+ } else {
ccr = readl(regs + CC(thrd->id));
+ }
/* If this req doesn't have valid xfer settings */
if (!_is_valid(ccr)) {
@@ -2928,6 +2930,11 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
num_chan = max_t(int, pi->pcfg.num_peri, pi->pcfg.num_chan);
pdmac->peripherals = kzalloc(num_chan * sizeof(*pch), GFP_KERNEL);
+ if (!pdmac->peripherals) {
+ ret = -ENOMEM;
+ dev_err(&adev->dev, "unable to allocate pdmac->peripherals\n");
+ goto probe_err5;
+ }
for (i = 0; i < num_chan; i++) {
pch = &pdmac->peripherals[i];