[PATCH 6/6] pccardctl: remove superfluous check

Wolfram Sang w.sang at pengutronix.de
Sun Jan 30 05:05:29 EST 2011


We can trust our own callers. Fixes:

 src/pccardctl.c:82: warning: the address of 'in_file' will always evaluate as 'true'

Reported-by: Alexander Mansurov <alexander.mansurov at gmail.com>
Signed-off-by: Wolfram Sang <w.sang at pengutronix.de>
---
 src/pccardctl.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/src/pccardctl.c b/src/pccardctl.c
index fe0c8c9..a59aff9 100644
--- a/src/pccardctl.c
+++ b/src/pccardctl.c
@@ -79,9 +79,6 @@ static int pccardctl_echo_one(unsigned long socket_no, const char *in_file)
         char file[SYSFS_PATH_MAX];
         struct sysfs_attribute *attr;
 
-	if (!in_file)
-		return -EINVAL;
-
         snprintf(file, SYSFS_PATH_MAX, "/sys/class/pcmcia_socket/pcmcia_socket%lu/%s",
                  socket_no, in_file);
 
-- 
1.7.2.3




More information about the linux-pcmcia mailing list