Commit 46738ab3 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration

Pull mailbox fixes from Jassi Brar:
 "Misc fixes for BCM mailbox driver

   - Fix build warnings by making static functions used within the file.
   - Check for potential NULL before dereferencing
   - Fix link error by defining HAS_DMA dependency"

* 'mailbox-devel' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
  fix:mailbox:bcm-pdc-mailbox:mark symbols static where possible
  mailbox: bcm-pdc: potential NULL dereference in pdc_shutdown()
  mailbox: Add HAS_DMA Kconfig dependency to BCM_PDC_MBOX
parents 6296c412 a75e4a85
...@@ -127,6 +127,7 @@ config XGENE_SLIMPRO_MBOX ...@@ -127,6 +127,7 @@ config XGENE_SLIMPRO_MBOX
config BCM_PDC_MBOX config BCM_PDC_MBOX
tristate "Broadcom PDC Mailbox" tristate "Broadcom PDC Mailbox"
depends on ARM64 || COMPILE_TEST depends on ARM64 || COMPILE_TEST
depends on HAS_DMA
default ARCH_BCM_IPROC default ARCH_BCM_IPROC
help help
Mailbox implementation for the Broadcom PDC ring manager, Mailbox implementation for the Broadcom PDC ring manager,
......
...@@ -469,7 +469,7 @@ static const struct file_operations pdc_debugfs_stats = { ...@@ -469,7 +469,7 @@ static const struct file_operations pdc_debugfs_stats = {
* this directory for a SPU. * this directory for a SPU.
* @pdcs: PDC state structure * @pdcs: PDC state structure
*/ */
void pdc_setup_debugfs(struct pdc_state *pdcs) static void pdc_setup_debugfs(struct pdc_state *pdcs)
{ {
char spu_stats_name[16]; char spu_stats_name[16];
...@@ -485,7 +485,7 @@ void pdc_setup_debugfs(struct pdc_state *pdcs) ...@@ -485,7 +485,7 @@ void pdc_setup_debugfs(struct pdc_state *pdcs)
&pdc_debugfs_stats); &pdc_debugfs_stats);
} }
void pdc_free_debugfs(void) static void pdc_free_debugfs(void)
{ {
if (debugfs_dir && simple_empty(debugfs_dir)) { if (debugfs_dir && simple_empty(debugfs_dir)) {
debugfs_remove_recursive(debugfs_dir); debugfs_remove_recursive(debugfs_dir);
...@@ -1191,10 +1191,11 @@ static void pdc_shutdown(struct mbox_chan *chan) ...@@ -1191,10 +1191,11 @@ static void pdc_shutdown(struct mbox_chan *chan)
{ {
struct pdc_state *pdcs = chan->con_priv; struct pdc_state *pdcs = chan->con_priv;
if (pdcs) if (!pdcs)
dev_dbg(&pdcs->pdev->dev, return;
"Shutdown mailbox channel for PDC %u", pdcs->pdc_idx);
dev_dbg(&pdcs->pdev->dev,
"Shutdown mailbox channel for PDC %u", pdcs->pdc_idx);
pdc_ring_free(pdcs); pdc_ring_free(pdcs);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment