summaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm
diff options
context:
space:
mode:
authorSimon Arlott <simon@fire.lp0.eu>2009-11-21 15:03:23 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 14:52:57 -0800
commit1bfbd283cd3082b6cadfbf340faf7d35b8a36b83 (patch)
treef01f9d74dcd3e829449953b5d84a26013a5c2f42 /drivers/usb/atm
parent4e0fa90d1de10d68429afa9353e10bb9436455db (diff)
downloadop-kernel-dev-1bfbd283cd3082b6cadfbf340faf7d35b8a36b83.zip
op-kernel-dev-1bfbd283cd3082b6cadfbf340faf7d35b8a36b83.tar.gz
USB: cxacru: return an empty value for modulation if there is no connection
When there is no connection, return an empty string instead of "0" for the connection modulation. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/atm')
-rw-r--r--drivers/usb/atm/cxacru.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 56802d2..4a26a6c 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -267,12 +267,12 @@ static ssize_t cxacru_sysfs_showattr_LINE(u32 value, char *buf)
static ssize_t cxacru_sysfs_showattr_MODU(u32 value, char *buf)
{
static char *str[] = {
- NULL,
+ "",
"ANSI T1.413",
"ITU-T G.992.1 (G.DMT)",
"ITU-T G.992.2 (G.LITE)"
};
- if (unlikely(value >= ARRAY_SIZE(str) || str[value] == NULL))
+ if (unlikely(value >= ARRAY_SIZE(str)))
return snprintf(buf, PAGE_SIZE, "%u\n", value);
return snprintf(buf, PAGE_SIZE, "%s\n", str[value]);
}
OpenPOWER on IntegriCloud