aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/hwtracing/stm/policy.c
diff options
context:
space:
mode:
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>2018-10-05 15:42:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-11 12:12:54 +0200
commit24c7bcb6a74914b529859a07fde27a1a55e13ade (patch)
tree5695badc3c5f27c5b3bf907d6ab37d9e3c0f343a /drivers/hwtracing/stm/policy.c
parentstm class: Factor out default framing protocol (diff)
downloadwireguard-linux-24c7bcb6a74914b529859a07fde27a1a55e13ade.tar.xz
wireguard-linux-24c7bcb6a74914b529859a07fde27a1a55e13ade.zip
stm class: Switch over to the protocol driver
Now that the default framing protocol is factored out into its own driver, switch over to using the driver for writing data. To that end, make the policy code require a valid protocol name (or absence thereof, which is equivalent to "p_basic"). Also, to make transition easier, make stm class request "p_basic" module at initialization time. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Tested-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/stm/policy.c')
-rw-r--r--drivers/hwtracing/stm/policy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hwtracing/stm/policy.c b/drivers/hwtracing/stm/policy.c
index 8bc90432ae69..5e51bed0787b 100644
--- a/drivers/hwtracing/stm/policy.c
+++ b/drivers/hwtracing/stm/policy.c
@@ -454,8 +454,7 @@ stp_policy_make(struct config_group *group, const char *name)
err = stm_lookup_protocol(proto, &pdrv, &pdrv_node_type);
kfree(devname);
- /* We don't have any protocol drivers yet */
- if (err != -ENOENT) {
+ if (err) {
stm_put_device(stm);
return ERR_PTR(-ENODEV);
}