diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2020-04-19 21:51:15 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-05-05 06:21:44 +0300 |
commit | 8893ab5e8ee5d7c12e0fc1dca4a309475064473d (patch) | |
tree | 1029074dd25ee6308c8bb3855c83234c7cf6c6d8 /drivers/soundwire | |
parent | 01de995075b20f58a77f408cdf49034682487429 (diff) | |
download | linux-8893ab5e8ee5d7c12e0fc1dca4a309475064473d.tar.xz |
soundwire: slave: don't init debugfs on device registration error
The error handling flow seems incorrect, there is no reason to try and
add debugfs support if the device registration did not
succeed. Return on error.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20200419185117.4233-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r-- | drivers/soundwire/slave.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c index aace57fae7f8..4bacdb187eab 100644 --- a/drivers/soundwire/slave.c +++ b/drivers/soundwire/slave.c @@ -68,6 +68,8 @@ static int sdw_slave_add(struct sdw_bus *bus, list_del(&slave->node); mutex_unlock(&bus->bus_lock); put_device(&slave->dev); + + return ret; } sdw_slave_debugfs_init(slave); |