re: dmaengine: pl330: Merge dma_pl330_dmac and pl330_dmac structs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Lars-Peter Clausen,

The patch f6f2421c0a1c: "dmaengine: pl330: Merge dma_pl330_dmac and
pl330_dmac structs" from Jul 6, 2014, leads to the following static
checker warning:

	drivers/dma/pl330.c:1376 pl330_submit_req()
	warn: variable dereferenced before check 'thrd' (see line 1367)

drivers/dma/pl330.c
  1364  static int pl330_submit_req(struct pl330_thread *thrd,
  1365          struct dma_pl330_desc *desc)
  1366  {
  1367          struct pl330_dmac *pl330 = thrd->dmac;
                                           ^^^^^^^^^^
Patch adds unchecked dereference.

  1368          struct _xfer_spec xs;
  1369          unsigned long flags;
  1370          void __iomem *regs;
  1371          unsigned idx;
  1372          u32 ccr;
  1373          int ret = 0;
  1374  
  1375          /* No Req or Unacquired Channel or DMAC */
  1376          if (!desc || !thrd || thrd->free)
                             ^^^^^
Existing code assumes "thrd" can be NULL.

  1377                  return -EINVAL;
  1378  

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux