Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[firefly-linux-kernel-4.4.55.git] / drivers / staging / gdm724x / gdm_usb.c
index f87dd6144c319cbb3b5728621a8f20a8fe73055b..92ea1a16afff2b6c177c53aca6cc3c768f7d98e9 100644 (file)
@@ -92,7 +92,7 @@ static struct usb_tx *alloc_tx_struct(int len)
        struct usb_tx *t = NULL;
        int ret = 0;
 
-       t = kzalloc(sizeof(struct usb_tx), GFP_ATOMIC);
+       t = kzalloc(sizeof(*t), GFP_ATOMIC);
        if (!t) {
                ret = -ENOMEM;
                goto out;
@@ -125,7 +125,7 @@ static struct usb_tx_sdu *alloc_tx_sdu_struct(void)
 {
        struct usb_tx_sdu *t_sdu;
 
-       t_sdu = kzalloc(sizeof(struct usb_tx_sdu), GFP_KERNEL);
+       t_sdu = kzalloc(sizeof(*t_sdu), GFP_KERNEL);
        if (!t_sdu)
                return NULL;
 
@@ -183,7 +183,7 @@ static struct usb_rx *alloc_rx_struct(void)
        struct usb_rx *r = NULL;
        int ret = 0;
 
-       r = kmalloc(sizeof(struct usb_rx), GFP_KERNEL);
+       r = kmalloc(sizeof(*r), GFP_KERNEL);
        if (!r) {
                ret = -ENOMEM;
                goto out;
@@ -347,7 +347,7 @@ static int init_usb(struct lte_udev *udev)
                tx->avail_count++;
        }
 
-       for (i = 0; i < MAX_RX_SUBMIT_COUNT*2; i++) {
+       for (i = 0; i < MAX_RX_SUBMIT_COUNT * 2; i++) {
                r = alloc_rx_struct();
                if (!r) {
                        ret = -ENOMEM;
@@ -745,7 +745,7 @@ static int gdm_usb_sdu_send(void *priv_dev, void *data, int len,
        } else {
            send_len = len - ETH_HLEN;
            send_len += SDU_PARAM_LEN;
-           memcpy(sdu->data, data+ETH_HLEN, len-ETH_HLEN);
+           memcpy(sdu->data, data + ETH_HLEN, len - ETH_HLEN);
        }
 
        sdu->len = gdm_cpu_to_dev16(&udev->gdm_ed, send_len);
@@ -830,11 +830,11 @@ static int gdm_usb_probe(struct usb_interface *intf,
                return -ENODEV;
        }
 
-       phy_dev = kzalloc(sizeof(struct phy_dev), GFP_KERNEL);
+       phy_dev = kzalloc(sizeof(*phy_dev), GFP_KERNEL);
        if (!phy_dev)
                return -ENOMEM;
 
-       udev = kzalloc(sizeof(struct lte_udev), GFP_KERNEL);
+       udev = kzalloc(sizeof(*udev), GFP_KERNEL);
        if (!udev) {
                ret = -ENOMEM;
                goto err_udev;