From: Tilman Schmidt Date: Wed, 9 May 2007 03:27:03 +0000 (-0700) Subject: usb_gigaset: don't kmalloc(0) X-Git-Tag: v2.6.22-rc1~338 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21d364954f5a2a97b4e378f34a13fbf296aa16ec;p=linux-2.6 usb_gigaset: don't kmalloc(0) Zero-sized allocations are pointless anyway, and the SLUB allocator complains about them, so stop doing that. Signed-off-by: Tilman Schmidt Signed-off-by: Hansjoerg Lipp Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index c8e1c357ce..a1263019df 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c @@ -138,8 +138,6 @@ struct usb_cardstate { char bchars[6]; /* for request 0x19 */ }; -struct usb_bc_state {}; - static inline unsigned tiocm_to_gigaset(unsigned state) { return ((state & TIOCM_DTR) ? 1 : 0) | ((state & TIOCM_RTS) ? 2 : 0); @@ -579,25 +577,21 @@ static int gigaset_brkchars(struct cardstate *cs, const unsigned char buf[6]) static int gigaset_freebcshw(struct bc_state *bcs) { - if (!bcs->hw.usb) - return 0; - //FIXME - kfree(bcs->hw.usb); + /* unused */ return 1; } /* Initialize the b-channel structure */ static int gigaset_initbcshw(struct bc_state *bcs) { - bcs->hw.usb = kmalloc(sizeof(struct usb_bc_state), GFP_KERNEL); - if (!bcs->hw.usb) - return 0; - + /* unused */ + bcs->hw.usb = NULL; return 1; } static void gigaset_reinitbcshw(struct bc_state *bcs) { + /* nothing to do for M10x */ } static void gigaset_freecshw(struct cardstate *cs)