summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2020-01-31 08:23:54 +0200
committerToomas Soome <tsoome@me.com>2020-06-05 09:08:34 +0300
commit5be38ebbbdbfff51cf09152ef2c304a0b4d68c0f (patch)
tree242357e012e0b54368fd090dd820890f21fc0de6
parent6b9ce6a49498244ac078b078afa3601c92b66d76 (diff)
downloadillumos-gate-5be38ebbbdbfff51cf09152ef2c304a0b4d68c0f.tar.gz
12569 ics951601: NULL pointer errors
Reviewed by: Yuri Pankov <ypankov@tintri.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/sun4u/ics951601/Makefile15
-rw-r--r--usr/src/uts/sun4u/io/i2c/clients/ics951601.c20
2 files changed, 10 insertions, 25 deletions
diff --git a/usr/src/uts/sun4u/ics951601/Makefile b/usr/src/uts/sun4u/ics951601/Makefile
index eb6443593c..aa6de449e8 100644
--- a/usr/src/uts/sun4u/ics951601/Makefile
+++ b/usr/src/uts/sun4u/ics951601/Makefile
@@ -23,8 +23,6 @@
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
# This makefile drives the ics951601 build.
#
# Path to the base of the uts directory tree (usually /usr/src/uts).
@@ -36,7 +34,6 @@ UTSBASE = ../..
#
MODULE = ics951601
OBJECTS = $(ICS951601_OBJS:%=$(OBJS_DIR)/%)
-LINTS = $(ICS951601_OBJS:%.o=$(LINTS_DIR)/%.ln)
ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE)
#
@@ -44,18 +41,12 @@ ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE)
#
include $(UTSBASE)/sun4u/Makefile.sun4u
-#
-# lint pass one enforcement
-#
-CFLAGS += $(CCVERBOSE)
-
LDFLAGS += -dy -N misc/i2c_svc
#
# Define targets
#
ALL_TARGET = $(BINARY)
-LINT_TARGET = $(MODULE).lint
INSTALL_TARGET = $(BINARY) $(ROOTMODULE)
.KEEP_STATE:
@@ -68,12 +59,6 @@ clean: $(CLEAN_DEPS)
clobber: $(CLOBBER_DEPS)
-lint: $(LINT_DEPS)
-
-modlintlib: $(MODLINTLIB_DEPS)
-
-clean.lint: $(CLEAN_LINT_DEPS)
-
install: $(INSTALL_DEPS)
#
diff --git a/usr/src/uts/sun4u/io/i2c/clients/ics951601.c b/usr/src/uts/sun4u/io/i2c/clients/ics951601.c
index 5ed6a41b49..6d316c574a 100644
--- a/usr/src/uts/sun4u/io/i2c/clients/ics951601.c
+++ b/usr/src/uts/sun4u/io/i2c/clients/ics951601.c
@@ -222,10 +222,10 @@ ics951601_close(dev_t dev, int flags, int otyp, cred_t *credp)
_NOTE(ARGUNUSED(flags, credp))
int instance;
- ics951601_unit_t *icsp;
+ ics951601_unit_t *icsp;
/*
- * Make sure the close is for the right file type
+ * Make sure the close is for the right file type
*/
if (otyp != OTYP_CHR) {
return (EINVAL);
@@ -247,8 +247,8 @@ ics951601_close(dev_t dev, int flags, int otyp, cred_t *credp)
static int
ics951601_attach(dev_info_t *dip)
{
- ics951601_unit_t *icsp;
- int instance = ddi_get_instance(dip);
+ ics951601_unit_t *icsp;
+ int instance = ddi_get_instance(dip);
if (ddi_soft_state_zalloc(ics951601_soft_statep, instance) != 0) {
cmn_err(CE_WARN, "%s%d failed to zalloc softstate",
@@ -270,7 +270,7 @@ ics951601_attach(dev_info_t *dip)
if (ddi_create_minor_node(dip, icsp->ics951601_name, S_IFCHR,
- instance, ICS951601_NODE_TYPE, NULL) == DDI_FAILURE) {
+ instance, ICS951601_NODE_TYPE, 0) == DDI_FAILURE) {
cmn_err(CE_WARN, "%s ddi_create_minor_node failed",
icsp->ics951601_name);
goto ATTACH_ERR;
@@ -333,7 +333,7 @@ static void
ics951601_detach(dev_info_t *dip)
{
ics951601_unit_t *icsp;
- int instance;
+ int instance;
instance = ddi_get_instance(dip);
icsp = ddi_get_soft_state(ics951601_soft_statep, instance);
@@ -374,7 +374,7 @@ ics951601_info(dev_info_t *dip, ddi_info_cmd_t cmd, void *arg, void **result)
static int
ics951601_suspend(dev_info_t *dip)
{
- ics951601_unit_t *icsp;
+ ics951601_unit_t *icsp;
int instance = ddi_get_instance(dip);
icsp = ddi_get_soft_state(ics951601_soft_statep, instance);
@@ -413,9 +413,9 @@ ics951601_suspend(dev_info_t *dip)
static int
ics951601_resume(dev_info_t *dip)
{
- int instance = ddi_get_instance(dip);
+ int instance = ddi_get_instance(dip);
ics951601_unit_t *icsp;
- int err = DDI_SUCCESS;
+ int err = DDI_SUCCESS;
icsp = (ics951601_unit_t *)
ddi_get_soft_state(ics951601_soft_statep, instance);
@@ -479,7 +479,7 @@ ics951601_s_detach(dev_info_t *dip, ddi_detach_cmd_t cmd)
static int
ics951601_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *credp,
- int *rvalp)
+ int *rvalp)
{
_NOTE(ARGUNUSED(credp, rvalp))