Skip to content

Commit

Permalink
fix drivers/kbs_keymap.h: return invalid value when keymapping api no…
Browse files Browse the repository at this point in the history
… provided

Signed-off-by: Richard Yim<richardyim@ami.com>
  • Loading branch information
richardyimjiajun authored and albertofloyd committed Feb 2, 2024
1 parent 10e724a commit d934708
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/kbs_keymap.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,14 @@ inline int keymap_get_keynum(struct km_api *api, uint8_t col, uint8_t row)
return api->get_keynum(col, row);
}

inline int keymap_get_fnkey(struct km_api *api, uint8_t key_num,
static inline int keymap_get_fnkey(struct km_api *api, uint8_t key_num,
struct fn_data *data,
bool pressed)
{
if (api == NULL) {
return -EINVAL;
}

if (api->get_fnkey == NULL) {
return -EINVAL;
}
Expand Down

0 comments on commit d934708

Please sign in to comment.