git: d2ebb215b8cf - stable/13 - arcmsr: Remove never-true NULL check from cdev callbacks.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 May 2022 00:20:58 UTC
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d2ebb215b8cf5f9f931c611332de352e26a11bf3 commit d2ebb215b8cf5f9f931c611332de352e26a11bf3 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-21 17:29:14 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-05-19 21:33:02 +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 (cherry picked from commit 108adb2ff52c73a92837452ef3ed641053bd1b6f) --- 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 f64093a94e7f..6a21a91fda58 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)); } /*