summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2020-01-30 20:25:50 +0200
committerToomas Soome <tsoome@me.com>2020-06-05 23:26:50 +0300
commita4ee597764d8f5774053526bb200ad03100a4ff0 (patch)
tree101c8c36d512f42c818d4a9f36ca0fcb98d0a8a8 /usr/src
parent734d822d17e7f65e682ac175dbcb29382b39620b (diff)
downloadillumos-joyent-a4ee597764d8f5774053526bb200ad03100a4ff0.tar.gz
12576 pcf8591: NULL pointer errors
Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/sun4u/io/i2c/clients/pcf8591.c6
-rw-r--r--usr/src/uts/sun4u/pcf8591/Makefile17
2 files changed, 3 insertions, 20 deletions
diff --git a/usr/src/uts/sun4u/io/i2c/clients/pcf8591.c b/usr/src/uts/sun4u/io/i2c/clients/pcf8591.c
index 3283fd02cb..bd70c6bba3 100644
--- a/usr/src/uts/sun4u/io/i2c/clients/pcf8591.c
+++ b/usr/src/uts/sun4u/io/i2c/clients/pcf8591.c
@@ -222,7 +222,7 @@ pcf8591_close(dev_t dev, int flags, int otyp, cred_t *credp)
static int
pcf8591_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))
@@ -236,7 +236,7 @@ pcf8591_ioctl(dev_t dev, int cmd, intptr_t arg, int mode,
int32_t value;
uint8_t uvalue;
- if (arg == NULL) {
+ if (arg == (intptr_t)NULL) {
D2CMN_ERR((CE_WARN, "PCF8591: ioctl: arg passed in to ioctl "
"= NULL\n"));
err = EINVAL;
@@ -485,7 +485,7 @@ pcf8591_do_attach(dev_info_t *dip)
PORT_TO_MINOR(I2C_PORT(i));
if (ddi_create_minor_node(dip, name, S_IFCHR, minor_number,
- "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->pcf8591_name, name);
ddi_soft_state_free(pcf8591soft_statep, instance);
diff --git a/usr/src/uts/sun4u/pcf8591/Makefile b/usr/src/uts/sun4u/pcf8591/Makefile
index f220f64c66..a735a87d7f 100644
--- a/usr/src/uts/sun4u/pcf8591/Makefile
+++ b/usr/src/uts/sun4u/pcf8591/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 pcf8591 build.
#
# Path to the base of the uts directory tree (usually /usr/src/uts).
@@ -37,7 +33,6 @@ UTSBASE = ../..
#
MODULE = pcf8591
OBJECTS = $(PCF8591_OBJS:%=$(OBJS_DIR)/%)
-LINTS = $(PCF8591_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)
#