summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-09-09 14:34:38 +0200
committerTobias Klauser <tklauser@distanz.ch>2014-09-09 14:34:38 +0200
commite0a7ae85351de7ebc43af1fe5f04e650c6736201 (patch)
treedba82b8cd3e91b864f4c112ab42b5065e43a5aa7
parent83db3213e55a646132e092014e162ebfe16b7236 (diff)
sock: Error out if setting of the system socket memory fails
Currently we ignore the return value of the write() calls to /proc/sys/net/core/{r,w}mem_{default,max} in set_system_socket_mem(). Better check the return value and notify the user about it. This also fixes a clang compiler warning about a variable explicitely assigned to itself. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--sock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sock.c b/sock.c
index e5f6eac..6c973ed 100644
--- a/sock.c
+++ b/sock.c
@@ -177,7 +177,8 @@ static void set_system_socket_mem(int which, int val)
slprintf(buff, sizeof(buff), "%d", val);
ret = write(fd, buff, strlen(buff));
- ret = ret;
+ if (ret < 0)
+ panic("Cannot set system socket memory!\n");
close(fd);
}
requirements a bit better lib/rbtree.c: fix typo in comment of ____rb_erase_color lib/Kconfig.debug: make CONFIG_STRICT_DEVMEM depend on CONFIG_DEVMEM MAINTAINERS: add drm and drm/i915 irc channels MAINTAINERS: add "C:" for URI for chat where developers hang out MAINTAINERS: add drm and drm/i915 bug filing info MAINTAINERS: add "B:" for URI where to file bugs get_maintainer: look for arbitrary letter prefixes in sections printk: add Kconfig option to set default console loglevel printk/sound: handle more message headers printk/btrfs: handle more message headers printk/kdb: handle more message headers ...
Diffstat (limited to 'sound/soc/samsung/littlemill.c')