Skip to contentSkip to conversation

Staging: emxx_udc: Remove argument test from function

PATCH In review Haneen Mohammed 3 participants 3 messages Mar 1, 2015 – Mar 2, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: emxx_udc: Remove argument test from function

This patch removes the test statement for an argument to _nbu2ss_pullup function, for it can't be null due to previous derefrences when its called.

---
 drivers/staging/emxx_udc/emxx_udc.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/staging/emxx_udc/emxx_udc.c +0 -5
index 0bfd268..b2a89a6 100644
@@ -2257,11 +2257,6 @@ static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on)
 {
 	u32	reg_dt;
 
-	if (!udc) {
-		pr_err("udc: %s, bad param\n", __func__);
-		return -EINVAL;
-	}
-
 	if (udc->vbus_active == 0)
 		return -ESHUTDOWN;
 
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Haneen Mohammed

This patch removes the test statement for an argument to _nbu2ss_pullup function, for it can't be null due to previous derefrences when its called.

Quoted 31 lines
---
 drivers/staging/emxx_udc/emxx_udc.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/staging/emxx_udc/emxx_udc.c +0 -6
index 0bfd268..b2a89a6 100644
@@ -2257,11 +2257,6 @@ static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on)
 {
 	u32	reg_dt;
 
-	if (!udc) {
-		pr_err("udc: %s, bad param\n", __func__);
-		return -EINVAL;
-	}
-
 	if (udc->vbus_active == 0)
 		return -ESHUTDOWN;
 
--

1.9.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1425244693-8713-1-git-send-email-hamohammed.sa%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

maintainer
#2 lore raw
In reply to Haneen Mohammed
Quoted 15 lines · Haneen Mohammed

This patch removes the test statement for an argument to _nbu2ss_pullup function, for it can't be null due to previous derefrences when its called.

---
 drivers/staging/emxx_udc/emxx_udc.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/staging/emxx_udc/emxx_udc.c +0 -0
index 0bfd268..b2a89a6 100644
@@ -2257,11 +2257,6 @@ static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on)
 {

drivers/staging/emxx_udc/emxx_udc.c static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on) · line 2262

Quoted 10 lines
drivers/staging/emxx_udc/emxx_udc.c +0 -5
 	u32	reg_dt;
 
-	if (!udc) {
-		pr_err("udc: %s, bad param\n", __func__);
-		return -EINVAL;
-	}
-
 	if (udc->vbus_active == 0)
 		return -ESHUTDOWN;
 

Does not apply :(