DMAENGINE: ste_dma40: fix possible use of uninitialized variable
authorJonas Aaberg <jonas.aberg@stericsson.com>
Mon, 9 Aug 2010 12:08:49 +0000 (12:08 +0000)
committerDan Williams <dan.j.williams@intel.com>
Wed, 22 Sep 2010 21:53:46 +0000 (14:53 -0700)
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/ste_dma40.c

index 2b209fa004bab471c184dbeb6f1eaf156b34f159..ac325e9181716e8c394cf4ecfea8f17a5c2ef884 100644 (file)
@@ -684,12 +684,12 @@ static void d40_config_write(struct d40_chan *d40c)
 
 static void d40_desc_load(struct d40_chan *d40c, struct d40_desc *d40d)
 {
-       if (d40d->lli_phy.dst && d40d->lli_phy.src) {
+       if (d40c->log_num == D40_PHY_CHAN) {
                d40_phy_lli_write(d40c->base->virtbase,
                                  d40c->phy_chan->num,
                                  d40d->lli_phy.dst,
                                  d40d->lli_phy.src);
-       } else if (d40d->lli_log.dst && d40d->lli_log.src) {
+       } else {
                struct d40_log_lli *src = d40d->lli_log.src;
                struct d40_log_lli *dst = d40d->lli_log.dst;
                int s;