summaryrefslogtreecommitdiffstats
path: root/sound/soc/sti/uniperif_player.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-10-01 16:14:24 +0200
committerThomas Gleixner <tglx@linutronix.de>2015-10-01 16:14:24 +0200
commitbebcb8dab6bac53b6a61a896db03781d1992cadb (patch)
tree4793b0c2e913db8cf573ee52d568471603273af6 /sound/soc/sti/uniperif_player.c
parentirqchip/renesas-intc-irqpin: r8a7778 IRLM setup support (diff)
parentgenirq: Introduce generic irq migration for cpu hotunplug (diff)
downloadlinux-bebcb8dab6bac53b6a61a896db03781d1992cadb.tar.xz
linux-bebcb8dab6bac53b6a61a896db03781d1992cadb.zip
Merge branch 'irq/for-arm' into irq/core
Bring in the change which we offered arm[64] folks to pull into their trees.
Diffstat (limited to 'sound/soc/sti/uniperif_player.c')
-rw-r--r--sound/soc/sti/uniperif_player.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/soc/sti/uniperif_player.c b/sound/soc/sti/uniperif_player.c
index f6eefe1b8f8f..843f037a317d 100644
--- a/sound/soc/sti/uniperif_player.c
+++ b/sound/soc/sti/uniperif_player.c
@@ -989,8 +989,8 @@ static int uni_player_parse_dt(struct platform_device *pdev,
if (!info)
return -ENOMEM;
- of_property_read_u32(pnode, "version", &player->ver);
- if (player->ver == SND_ST_UNIPERIF_VERSION_UNKNOWN) {
+ if (of_property_read_u32(pnode, "version", &player->ver) ||
+ player->ver == SND_ST_UNIPERIF_VERSION_UNKNOWN) {
dev_err(dev, "Unknown uniperipheral version ");
return -EINVAL;
}
@@ -998,10 +998,16 @@ static int uni_player_parse_dt(struct platform_device *pdev,
if (player->ver >= SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0)
info->underflow_enabled = 1;
- of_property_read_u32(pnode, "uniperiph-id", &info->id);
+ if (of_property_read_u32(pnode, "uniperiph-id", &info->id)) {
+ dev_err(dev, "uniperipheral id not defined");
+ return -EINVAL;
+ }
/* Read the device mode property */
- of_property_read_string(pnode, "mode", &mode);
+ if (of_property_read_string(pnode, "mode", &mode)) {
+ dev_err(dev, "uniperipheral mode not defined");
+ return -EINVAL;
+ }
if (strcasecmp(mode, "hdmi") == 0)
info->player_type = SND_ST_UNIPERIF_PLAYER_TYPE_HDMI;