lkml.org 
[lkml]   [2009]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] wusb: Use sizeof struct rather than pointer
The sizeof the struct should be used rather than sizeof the pointer

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
drivers/usb/wusbcore/security.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

Unless I am mistaken?

diff --git a/drivers/usb/wusbcore/security.c b/drivers/usb/wusbcore/security.c
index 4516c36..857f6e9 100644
--- a/drivers/usb/wusbcore/security.c
+++ b/drivers/usb/wusbcore/security.c
@@ -213,7 +213,7 @@ int wusb_dev_sec_add(struct wusbhc *wusbhc,

result = usb_get_descriptor(usb_dev, USB_DT_SECURITY,
0, secd, sizeof(struct usb_security_descriptor));
- if (result < sizeof(secd)) {
+ if (result < sizeof(*secd)) {
dev_err(dev, "Can't read security descriptor or "
"not enough data: %d\n", result);
goto out;

\
 
 \ /
  Last update: 2009-11-21 19:41    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog