git: 108adb2ff52c - main - arcmsr: Remove never-true NULL check from cdev callbacks.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 21 Apr 2022 17:30:15 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=108adb2ff52c73a92837452ef3ed641053bd1b6f

commit 108adb2ff52c73a92837452ef3ed641053bd1b6f
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-21 17:29:14 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-21 17:29:14 +0000

    arcmsr: Remove never-true NULL check from cdev callbacks.
    
    si_drv1 will always hold a non-NULL pointer.
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D35005
---
 sys/dev/arcmsr/arcmsr.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/sys/dev/arcmsr/arcmsr.c b/sys/dev/arcmsr/arcmsr.c
index 87147402d091..2a1b0250364f 100644
--- a/sys/dev/arcmsr/arcmsr.c
+++ b/sys/dev/arcmsr/arcmsr.c
@@ -240,11 +240,6 @@ static struct cdevsw arcmsr_cdevsw={
 */
 static int arcmsr_open(struct cdev *dev, int flags, int fmt, struct thread *proc)
 {
-	struct AdapterControlBlock *acb = dev->si_drv1;
-
-	if (acb == NULL) {
-		return ENXIO;
-	}
 	return (0);
 }
 /*
@@ -253,11 +248,6 @@ static int arcmsr_open(struct cdev *dev, int flags, int fmt, struct thread *proc
 */
 static int arcmsr_close(struct cdev *dev, int flags, int fmt, struct thread *proc)
 {
-	struct AdapterControlBlock *acb = dev->si_drv1;
-
-	if (acb == NULL) {
-		return ENXIO;
-	}
 	return 0;
 }
 /*
@@ -268,9 +258,6 @@ static int arcmsr_ioctl(struct cdev *dev, u_long ioctl_cmd, caddr_t arg, int fla
 {
 	struct AdapterControlBlock *acb = dev->si_drv1;
 
-	if (acb == NULL) {
-		return ENXIO;
-	}
 	return (arcmsr_iop_ioctlcmd(acb, ioctl_cmd, arg));
 }
 /*