Add parenthesis to channel writable test
authorReto Buerki <reet@codelabs.ch>
Wed, 4 Apr 2018 10:25:38 +0000 (12:25 +0200)
committerReto Buerki <reet@codelabs.ch>
Wed, 4 Apr 2018 10:26:10 +0000 (12:26 +0200)
writer.c

index df607f6..92723a2 100644 (file)
--- a/writer.c
+++ b/writer.c
@@ -118,7 +118,7 @@ int initialize_writer(struct dev_info *dev_info,
                           channel->name.data);
                return -EPERM;
        }
-       if (!channel->data.mem.flags & MEM_WRITABLE_FLAG) {
+       if (!(channel->data.mem.flags & MEM_WRITABLE_FLAG)) {
                netdev_err(dev_info->dev, "Writer channel '%s' not writable\n",
                           channel->name.data);
                return -EPERM;