On Tue, Mar 14, 2017 at 09:54:07AM +1100, Tobin C. Harding wrote: > Return value from kmalloc() does not require a cast. > > Remove unnecessary cast. > > Signed-off-by: Tobin C. Harding <me@xxxxxxxx> > --- > drivers/staging/ks7010/ks_wlan_net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c > index 1451ba7..e1e4a31 100644 > --- a/drivers/staging/ks7010/ks_wlan_net.c > +++ b/drivers/staging/ks7010/ks_wlan_net.c > @@ -2561,7 +2561,7 @@ static int ks_wlan_data_write(struct net_device *dev, > if (priv->sleep_mode == SLP_SLEEP) > return -EPERM; > /* for SLEEP MODE */ > - wbuff = (unsigned char *)kmalloc(dwrq->length, GFP_ATOMIC); > + wbuff = kmalloc(dwrq->length, GFP_ATOMIC); > if (!wbuff) > return -EFAULT; This should also return -ENOMEM, but that's a separate fix :) thanks, greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel