Print this page
5253 kmem_alloc/kmem_zalloc won't fail with KM_SLEEP
5254 getrbuf won't fail with KM_SLEEP

*** 2496,2508 **** xge_hal_status_e status; int count = 0, retsize; char *buf; buf = kmem_alloc(XGELL_STATS_BUFSIZE, KM_SLEEP); - if (buf == NULL) { - return (ENOSPC); - } status = xge_hal_aux_stats_tmac_read(lldev->devh, XGELL_STATS_BUFSIZE, buf, &retsize); if (status != XGE_HAL_OK) { kmem_free(buf, XGELL_STATS_BUFSIZE); --- 2496,2505 ----
*** 2562,2574 **** xge_hal_status_e status; int retsize; char *buf; buf = kmem_alloc(XGELL_PCICONF_BUFSIZE, KM_SLEEP); - if (buf == NULL) { - return (ENOSPC); - } status = xge_hal_aux_pci_config_read(lldev->devh, XGELL_PCICONF_BUFSIZE, buf, &retsize); if (status != XGE_HAL_OK) { kmem_free(buf, XGELL_PCICONF_BUFSIZE); xge_debug_ll(XGE_ERR, "pci_config_read(): status %d", status); --- 2559,2568 ----
*** 2588,2600 **** xge_hal_status_e status; int retsize; char *buf; buf = kmem_alloc(XGELL_ABOUT_BUFSIZE, KM_SLEEP); - if (buf == NULL) { - return (ENOSPC); - } status = xge_hal_aux_about_read(lldev->devh, XGELL_ABOUT_BUFSIZE, buf, &retsize); if (status != XGE_HAL_OK) { kmem_free(buf, XGELL_ABOUT_BUFSIZE); xge_debug_ll(XGE_ERR, "about_read(): status %d", status); --- 2582,2591 ----
*** 2616,2628 **** xge_hal_status_e status; int retsize; char *buf; buf = kmem_alloc(XGELL_IOCTL_BUFSIZE, KM_SLEEP); - if (buf == NULL) { - return (ENOSPC); - } status = xge_hal_aux_bar0_read(lldev->devh, bar0_offset, XGELL_IOCTL_BUFSIZE, buf, &retsize); if (status != XGE_HAL_OK) { kmem_free(buf, XGELL_IOCTL_BUFSIZE); xge_debug_ll(XGE_ERR, "bar0_read(): status %d", status); --- 2607,2616 ----
*** 2661,2673 **** xgell_debug_level_get(queue_t *q, mblk_t *mp, caddr_t cp, cred_t *credp) { char *buf; buf = kmem_alloc(XGELL_IOCTL_BUFSIZE, KM_SLEEP); - if (buf == NULL) { - return (ENOSPC); - } (void) mi_mpprintf(mp, "debug_level %d", xge_hal_driver_debug_level()); kmem_free(buf, XGELL_IOCTL_BUFSIZE); return (0); } --- 2649,2658 ----
*** 2693,2705 **** xgell_debug_module_mask_get(queue_t *q, mblk_t *mp, caddr_t cp, cred_t *credp) { char *buf; buf = kmem_alloc(XGELL_IOCTL_BUFSIZE, KM_SLEEP); - if (buf == NULL) { - return (ENOSPC); - } (void) mi_mpprintf(mp, "debug_module_mask 0x%08x", xge_hal_driver_debug_module_mask()); kmem_free(buf, XGELL_IOCTL_BUFSIZE); return (0); --- 2678,2687 ----
*** 2734,2746 **** xge_hal_status_e status; int retsize; char *buf; buf = kmem_alloc(XGELL_DEVCONF_BUFSIZE, KM_SLEEP); - if (buf == NULL) { - return (ENOSPC); - } status = xge_hal_aux_device_config_read(lldev->devh, XGELL_DEVCONF_BUFSIZE, buf, &retsize); if (status != XGE_HAL_OK) { kmem_free(buf, XGELL_DEVCONF_BUFSIZE); xge_debug_ll(XGE_ERR, "device_config_read(): status %d", --- 2716,2725 ----