summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2020-01-31 08:19:40 +0200
committerToomas Soome <tsoome@me.com>2020-06-03 23:50:37 +0300
commit1bc19844f9d6f3eb43c88648a6862df9de480213 (patch)
tree7e89eaffa6d7d05bb9d847b3847f3d7dbb2b90df
parent89545d90d6724cb5f0b2cc0d34b1e0b21f2c31f1 (diff)
downloadillumos-joyent-1bc19844f9d6f3eb43c88648a6862df9de480213.tar.gz
12575 ltc1427: NULL pointer errors
Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Sebastian Wiedenroth <wiedi@frubar.net> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/uts/sun4u/io/i2c/clients/ltc1427.c12
-rw-r--r--usr/src/uts/sun4u/ltc1427/Makefile17
2 files changed, 6 insertions, 23 deletions
diff --git a/usr/src/uts/sun4u/io/i2c/clients/ltc1427.c b/usr/src/uts/sun4u/io/i2c/clients/ltc1427.c
index a68be45600..a61bf76a25 100644
--- a/usr/src/uts/sun4u/io/i2c/clients/ltc1427.c
+++ b/usr/src/uts/sun4u/io/i2c/clients/ltc1427.c
@@ -218,17 +218,17 @@ ltc1427_close(dev_t dev, int flags, int otyp, cred_t *credp)
static int
ltc1427_ioctl(dev_t dev, int cmd, intptr_t arg, int mode,
- cred_t *credp, int *rvalp)
+ cred_t *credp, int *rvalp)
{
_NOTE(ARGUNUSED(credp, rvalp))
- struct ltc1427_unit *unitp;
- int instance;
- int err = 0;
+ struct ltc1427_unit *unitp;
+ int instance;
+ int err = 0;
i2c_transfer_t *i2c_tran_pointer;
int32_t fan_speed;
- if (arg == NULL) {
+ if (arg == (intptr_t)NULL) {
D2CMN_ERR((CE_WARN, "LTC1427: ioctl: arg passed in to ioctl "
"= NULL\n"));
err = EINVAL;
@@ -358,7 +358,7 @@ ltc1427_do_attach(dev_info_t *dip)
"%s%d", ddi_node_name(dip), instance);
if (ddi_create_minor_node(dip, "ltc1427", S_IFCHR, instance,
- "ddi_i2c:adio", NULL) == DDI_FAILURE) {
+ "ddi_i2c:adio", 0) == DDI_FAILURE) {
cmn_err(CE_WARN, "%s ddi_create_minor_node failed for "
"%s\n", unitp->ltc1427_name, "ltc1427");
ddi_soft_state_free(ltc1427soft_statep, instance);
diff --git a/usr/src/uts/sun4u/ltc1427/Makefile b/usr/src/uts/sun4u/ltc1427/Makefile
index dd9b438c27..c15d8c2de1 100644
--- a/usr/src/uts/sun4u/ltc1427/Makefile
+++ b/usr/src/uts/sun4u/ltc1427/Makefile
@@ -22,10 +22,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 ltc1427 build.
#
# Path to the base of the uts directory tree (usually /usr/src/uts).
@@ -37,7 +33,6 @@ UTSBASE = ../..
#
MODULE = ltc1427
OBJECTS = $(LTC1427_OBJS:%=$(OBJS_DIR)/%)
-LINTS = $(LTC1427_OBJS:%.o=$(LINTS_DIR)/%.ln)
ROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE)
#
@@ -45,18 +40,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:
@@ -69,12 +58,6 @@ clean: $(CLEAN_DEPS)
clobber: $(CLOBBER_DEPS)
-lint: $(LINT_DEPS)
-
-modlintlib: $(MODLINTLIB_DEPS)
-
-clean.lint: $(CLEAN_LINT_DEPS)
-
install: $(INSTALL_DEPS)
#