[PATCH 1/1] [ALSA] SOC: Fix setting codec register with debugfs filesystem merge error

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

 



Call device_create_file only once in snd_soc_dapm_sys_add function.

Signed-off-by: Troy Kisky <troy.kisky@xxxxxxxxxxxxxxxxxxx>

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 7bf3c40..0fecbb4 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -822,14 +822,8 @@ static DEVICE_ATTR(dapm_widget, 0444, dapm_widget_show, NULL);
 
 int snd_soc_dapm_sys_add(struct device *dev)
 {
-	int ret;
-
 	if (!dapm_status)
 		return 0;
-
-	ret = device_create_file(dev, &dev_attr_dapm_widget);
-	if (ret != 0)
-		return ret;
 	return device_create_file(dev, &dev_attr_dapm_widget);
 }
 
-- 
1.5.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-next" 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 USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux