Print this page
5253 kmem_alloc/kmem_zalloc won't fail with KM_SLEEP
5254 getrbuf won't fail with KM_SLEEP
@@ -2496,13 +2496,10 @@
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);
@@ -2562,13 +2559,10 @@
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);
@@ -2588,13 +2582,10 @@
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);
@@ -2616,13 +2607,10 @@
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);
@@ -2661,13 +2649,10 @@
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);
}
@@ -2693,13 +2678,10 @@
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);
@@ -2734,13 +2716,10 @@
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",