File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -80,21 +80,21 @@ static int md5_init(FAR cryptodev_context_t *ctx)
80
80
fd = open ("/dev/crypto" , O_RDWR , 0 );
81
81
if (fd < 0 )
82
82
{
83
- return - errno ;
83
+ return - get_errno () ;
84
84
}
85
85
86
86
ret = ioctl (fd , CRIOGET , & ctx -> fd );
87
87
close (fd );
88
88
if (ret < 0 )
89
89
{
90
- ret = - errno ;
90
+ return - get_errno () ;
91
91
}
92
92
93
93
ctx -> session .mac = CRYPTO_MD5 ;
94
94
ret = ioctl (ctx -> fd , CIOCGSESSION , & ctx -> session );
95
95
if (ret < 0 )
96
96
{
97
- return - errno ;
97
+ return - get_errno () ;
98
98
}
99
99
100
100
ctx -> crypt .ses = ctx -> session .ses ;
@@ -111,7 +111,7 @@ static int md5_update(FAR cryptodev_context_t *ctx,
111
111
ctx -> crypt .len = ilen ;
112
112
113
113
ret = ioctl (ctx -> fd , CIOCCRYPT , & ctx -> crypt );
114
- return ret < 0 ? - errno : ret ;
114
+ return ret < 0 ? - get_errno () : ret ;
115
115
}
116
116
117
117
static int md5_finish (FAR cryptodev_context_t * ctx ,
@@ -125,7 +125,7 @@ static int md5_finish(FAR cryptodev_context_t *ctx,
125
125
ret = ioctl (ctx -> fd , CIOCCRYPT , & ctx -> crypt );
126
126
if (ret < 0 )
127
127
{
128
- return - errno ;
128
+ return - get_errno () ;
129
129
}
130
130
131
131
ioctl (ctx -> fd , CIOCFSESSION , & ctx -> session .ses );
You can’t perform that action at this time.
0 commit comments